World 25 of 26 · Advanced

🧠 Data Structures & Algorithms

14 Java concepts, each explained step by step with real code, a common trap and practice questions.

  1. Big-O notationO(1), O(log n), O(n), O(n log n), O(n²); time vs space.
  2. Linear vs binary searchBinary search needs sorted data; off-by-one and overflow in (lo+hi)/2.
  3. Simple sortsBubble, selection, insertion sort and when insertion sort wins.
  4. Merge sort & quicksortDivide and conquer, stability, worst cases.
  5. How Java sortsDual-pivot quicksort for primitives, TimSort (stable) for objects.
  6. Stacks & queues in practiceBalanced brackets, BFS, undo — using ArrayDeque.
  7. Linked listsNodes and pointers, reversal, cycle detection.
  8. Hash tablesHashing, collisions, load factor — the theory behind HashMap.
  9. Trees & BSTsTraversals (in/pre/post/level order), balanced trees, TreeMap as a red-black tree.
  10. HeapsBinary heap operations and top-K problems with PriorityQueue.
  11. GraphsAdjacency lists, BFS, DFS, shortest paths (Dijkstra) at a conceptual level.
  12. Recursion & backtrackingSubsets, permutations, pruning.
  13. Dynamic programmingOverlapping subproblems, memoization vs tabulation.
  14. Common techniquesTwo pointers, sliding window, prefix sums, greedy.