0% found this document useful (0 votes)
11 views3 pages

Leetcode Patt Erns

The document outlines various algorithmic techniques and associated LeetCode problems, categorized into sections such as Fast & Slow Pointer, Merge Intervals, Sliding Window, and more. Each section includes links to specific problems that exemplify the technique. This serves as a comprehensive guide for practicing different algorithm strategies.

Uploaded by

Dileesha A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views3 pages

Leetcode Patt Erns

The document outlines various algorithmic techniques and associated LeetCode problems, categorized into sections such as Fast & Slow Pointer, Merge Intervals, Sliding Window, and more. Each section includes links to specific problems that exemplify the technique. This serves as a comprehensive guide for practicing different algorithm strategies.

Uploaded by

Dileesha A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1.

Fast & Slow Pointer

• Linked List Cycle: [Link]


[Link]+[Link]+[Link]+15

• Linked List Cycle II: (same approach, find entry) Link is similar; search "linked-list-cycle-ii"
directly

2. Merge Intervals

• Merge Intervals (56): [Link]


[Link]+[Link]+[Link]+2

• Non-overlapping Intervals (435): [Link]


[Link]

3. Sliding Window

• Sliding Window Maximum (239): [Link]


maximum/ [Link]+[Link]+[Link]+15

• Minimum Window Substring (76): [Link]


substring/ [Link]

4. Islands (Matrix Traversal)

• Number of Islands (200): [Link]


[Link]+[Link]+[Link]+2

• Number of Closed Islands (1254): [Link]


islands/ [Link]+[Link]+[Link]+15

5. Two Pointers

• Two Sum II – Input Array Is Sorted (167): [Link]


array-is-sorted/ [Link]+[Link]+[Link]+15

• Container With Most Water (11): [Link]


water/

6. Cyclic Sort

• Find All Numbers Disappeared in an Array (448): [Link]


numbers-disappeared-in-an-array/ [Link]+[Link]+[Link]+3

• Find All Duplicates in an Array (442): [Link]


an-array/

7. In-place Reversal of Linked List

• Reverse Linked List (206): [Link]


[Link]+[Link]+1

• Reverse Linked List II (92): [Link]


[Link]+[Link]+[Link]+15

8. Breadth-First Search (BFS)


• Binary Tree Level Order Traversal (102): [Link]
order-traversal/ [Link]+[Link]+[Link]+15

• Number of Islands (200): (also BFS for grids) [Link]+[Link]+[Link]+9

9. Depth-First Search (DFS)

• Number of Islands (200): [Link]

• Find Eventual Safe States (802): [Link]

10. Two Heaps

• Find Median from Data Stream (295): [Link]


data-stream/

• Sliding Window Median (480): [Link]


[Link]

11. Subsets

• Subsets (78): [Link]

• Subsets II (90): [Link]

12. Modified Binary Search

• Search in Rotated Sorted Array (33): [Link]


sorted-array/

• Find Minimum in Rotated Sorted Array (153): [Link]


minimum-in-rotated-sorted-array/

13. Bitwise XOR

• Single Number (136): [Link]

• Single Number II (137): [Link]

14. Top ‘K’ Elements

• Top K Frequent Elements (347): [Link]

• Kth Largest Element in an Array (215): [Link]


in-an-array/

15. K-way Merge

• Merge k Sorted Lists (23): [Link]

• Ugly Number II (264): [Link]

16. 0/1 Knapsack (DP)

• Partition Equal Subset Sum (416): [Link]


sum/

17. Unbounded Knapsack (DP)


• Coin Change (322): [Link]

• Combination Sum (39): [Link]

18. Topological Sort (Graphs)

• Course Schedule (207): [Link]

• Alien Dictionary (269): [Link]

19. Monotonic Stack

• Next Greater Element I (496): [Link]

• Largest Rectangle in Histogram (84): [Link]


histogram/

20. Backtracking

• Word Search (79): [Link]

• Generate Parentheses (22): [Link]

21. Union Find

• Number of Islands II (305): [Link]

• Redundant Connection (684): [Link]

22. Greedy Algorithm

• Non-overlapping Intervals (435): [Link]


[Link]

• Jump Game II (45): [Link]

You might also like