Skip to content
Codeloom

← Back to DSA overview

DSA tutorials

277 articles · page 13 of 14

Hand-written tutorials, ordered as a recommended learning path.

  1. 241 Combination Sum Solve Combination Sum with a clean backtracking template. Pruning, duplicate avoidance, complexity discussion, and interview script.
  2. 242 Container Water Solve Container With Most Water with the two-pointer technique. We prove correctness and contrast it with the quadratic brute force.
  3. 243 Course Schedule Detect cycles and produce a valid course order using DFS-based topological sort. Includes BFS Kahn alternative and interview script.
  4. 244 Daily Temperatures Solve Daily Temperatures with a monotonic decreasing stack of indices. Includes brute force comparison, walkthrough, complexity, and interview tips.
  5. 245 Group Anagrams Solve the Group Anagrams problem cleanly with a hash map keyed by sorted strings or character counts. Includes complexity analysis and interview talking points.
  6. 246 Generate Parentheses Solve Generate Parentheses with counting-based backtracking. Clean invariant, walkthrough, complexity discussion, and interview tips.
  7. 247 House Robber Solve House Robber with the pick-or-skip DP recurrence, then optimize to O(1) space. Includes interview script and related variants.
  8. 248 Invert Tree Solve Invert Binary Tree with a four-line recursive swap and an iterative BFS alternative, including complexity and interview talking points.
  9. 249 Phone Letters Solve Letter Combinations of a Phone Number with backtracking. Mapping setup, recursive enumeration, complexity, and interview walkthrough.
  10. 250 Longest Consecutive Solve Longest Consecutive Sequence in O(n) using a hash set and a start-of-run check. Walkthrough, edge cases, and interview script.
  11. 251 Longest Palindrome Walk through the Longest Palindromic Substring problem using the expand-around-center technique. Compare brute force, DP, and the optimal approach with examples.
  12. 252 Longest Substring Solve Longest Substring Without Repeating Characters using a sliding window with a hash map. We go from brute force to a clean O(n) sweep.
  13. 253 LRU Cache Design LRU Cache with a hash map and a doubly linked list to get O(1) get and put, with a clean implementation and interview tips.
  14. 254 Max Depth Compute tree depth with a three-line recursive DFS and an iterative BFS alternative, with complexity analysis and interview tips.
  15. 255 Max Subarray A clear walkthrough of Maximum Subarray. We build Kadane's algorithm from first principles and contrast it with the divide and conquer approach.
  16. 256 Merge Two Lists Solve Merge Two Sorted Lists with the dummy-head pointer pattern, plus a recursive variant, edge cases, and interview explanation tips.
  17. 257 Min Stack Design a stack that supports push, pop, top, and getMin in constant time. Walkthrough of the two-stack and pair-stack solutions with edge cases and interview tips.
  18. 258 Num Islands Solve Number of Islands with grid DFS and BFS, including a union-find variant, edge-case handling, and clear interview talking points.
  19. 259 Permutations Solve Permutations with backtracking and a used array. Compare swap-in-place vs used-array, walkthrough, complexity, and interview tips.
  20. 260 Product Except Self Solve Product of Array Except Self in O(n) without division using prefix and suffix passes. Clean walkthrough plus interview script.