Posts in 2024
  • Functional Interface

    Thursday, June 13, 2024 in Java Interview Questions

    Functional Interface An interface that contains exactly one abstract method @FunctionalInterface Used to mark an interface as a functional interface Usage with Lambda Expressions Lambda expressions provide a simple way to implement functional …

    Read more

  • Filtering Rows Based On Conditions

    Thursday, June 13, 2024 in SQL Server Interview Questions

    Filtering Rows Based On Conditions SELECT col_name FROM table_name WHERE condition; -- condition can use `AND`, `OR`, `NOT`, `()` SELECT col_name FROM table_name WHERE col_name IN (val_list); -- or sub_query -- or `NOT IN` SELECT col_name FROM …

    Read more

  • Exception Handling

    Thursday, June 13, 2024 in Spring Interview Questions

    Exception Handling @ControllerAdvice Used on a class to make it a global exception handler @ExceptionHandler Used on methods within a @ControllerAdvice class to define the HTTP response for specific exceptions @ControllerAdvice public class …

    Read more

  • Stream

    Thursday, June 13, 2024 in Java Interview Questions

    Stream An abstraction that allows you to process sequences of elements in a functional style Stream Operations Intermediate Operations eg. filter Terminal Operations eg. toList public class Main { public static void main(String[] args) { …

    Read more

  • Query Without Duplicate Rows

    Thursday, June 13, 2024 in SQL Server Interview Questions

    Query Without Duplicate Rows SELECT DISTINCT col_name FROM table_name; SELECT DISTINCT column1, column2, column3 FROM table_name; SELECT COUNT(DISTINCT col_name) FROM table_name; DISTINCT Only get the unique values Can be used with multiple columns …

    Read more

  • Basic

    Thursday, June 13, 2024 in LeetCode Notes

    Starred by 25+ users, GitHub Repo: LeetCode Pattern 500 offers: 500 solutions for LeetCode problems in Python and Java 17 notes on essential concepts related to data structures and algorithms 130 patterns for solving LeetCode problems basic …

    Read more

  • @CrossOrigin

    Thursday, June 13, 2024 in Spring Interview Questions

    @CrossOrigin @CrossOrigin enable CORS request on whole controller or certain methods

    Read more

  • SELECT Execution Order

    Thursday, June 13, 2024 in SQL Server Interview Questions

    SELECT Execution Order 6. SELECT col, aggregate_func(col), windwo_func(col) OVER (PARTITION BY col ORDER BY col) 1. FROM table1 2. JOIN table2 ON table1.col1 = table2.col2 3. WHERE condition 4. GROUP BY col 5. HAVING condition 7. ORDER BY col --- 1. …

    Read more

  • Segment Tree

    Thursday, June 13, 2024 in LeetCode Notes

    Starred by 25+ users, GitHub Repo: LeetCode Pattern 500 offers: 500 solutions for LeetCode problems in Python and Java 17 notes on essential concepts related to data structures and algorithms 130 patterns for solving LeetCode problems segment tree …

    Read more

  • Generic

    Thursday, June 13, 2024 in Java Interview Questions

    Generic Generics enable types (classes and interfaces) to be parameters when defining classes, interfaces, and methods Pros Stronger type checks at compile time No casting needed Ability to implement generic algorithms Declare Generics Generic class …

    Read more