Top 20 DSA patterns with sample
Leetcode problems and free resources
to prepare
Follow us on LinkedIn and X for more updates and
insights.
1. Sliding Window
● LeetCode Problems:
○ Minimum Size Subarray Sum
○ Longest Substring Without Repeating Characters
○ Permutation in String
● Free Resources:
○ GeeksforGeeks - Sliding Window Technique
○ Educative.io - Sliding Window Pattern
2. Islands (Matrix Traversal)
● LeetCode Problems:
○ Number of Islands
○ Max Area of Island
○ Surrounded Regions
● Free Resources:
○ GeeksforGeeks - Flood Fill Algorithm
○ YouTube - Graph Theory Basics
3. Two Pointers
, ● LeetCode Problems:
○ Two Sum II - Input Array Is Sorted
○ Container With Most Water
○ Palindrome Linked List
● Free Resources:
○ GeeksforGeeks - Two Pointer Technique
○ Educative.io - Two Pointer Pattern
4. Fast & Slow Pointers
● LeetCode Problems:
○ Linked List Cycle
○ Find the Duplicate Number
○ Middle of the Linked List
● Free Resources:
○ GeeksforGeeks - Floyd’s Cycle-Finding Algorithm
○ Educative.io - Fast & Slow Pointers
5. Merge Intervals
● LeetCode Problems:
○ Merge Intervals
○ Insert Interval
○ Interval List Intersections
● Free Resources:
○ GeeksforGeeks - Interval Problems
○ Educative.io - Merge Intervals Pattern
6. Cyclic Sort
● LeetCode Problems:
○ Find All Numbers Disappeared in an Array
○ Find the Duplicate Number
○ First Missing Positive
● Free Resources:
○ GeeksforGeeks - Cycle Sort
○ Educative.io - Cyclic Sort
Leetcode problems and free resources
to prepare
Follow us on LinkedIn and X for more updates and
insights.
1. Sliding Window
● LeetCode Problems:
○ Minimum Size Subarray Sum
○ Longest Substring Without Repeating Characters
○ Permutation in String
● Free Resources:
○ GeeksforGeeks - Sliding Window Technique
○ Educative.io - Sliding Window Pattern
2. Islands (Matrix Traversal)
● LeetCode Problems:
○ Number of Islands
○ Max Area of Island
○ Surrounded Regions
● Free Resources:
○ GeeksforGeeks - Flood Fill Algorithm
○ YouTube - Graph Theory Basics
3. Two Pointers
, ● LeetCode Problems:
○ Two Sum II - Input Array Is Sorted
○ Container With Most Water
○ Palindrome Linked List
● Free Resources:
○ GeeksforGeeks - Two Pointer Technique
○ Educative.io - Two Pointer Pattern
4. Fast & Slow Pointers
● LeetCode Problems:
○ Linked List Cycle
○ Find the Duplicate Number
○ Middle of the Linked List
● Free Resources:
○ GeeksforGeeks - Floyd’s Cycle-Finding Algorithm
○ Educative.io - Fast & Slow Pointers
5. Merge Intervals
● LeetCode Problems:
○ Merge Intervals
○ Insert Interval
○ Interval List Intersections
● Free Resources:
○ GeeksforGeeks - Interval Problems
○ Educative.io - Merge Intervals Pattern
6. Cyclic Sort
● LeetCode Problems:
○ Find All Numbers Disappeared in an Array
○ Find the Duplicate Number
○ First Missing Positive
● Free Resources:
○ GeeksforGeeks - Cycle Sort
○ Educative.io - Cyclic Sort