0% found this document useful (0 votes)
21 views2 pages

DSA Pattern CheatSheet LeetCode DS

The document provides a cheat sheet for various data structure and algorithm patterns commonly used in coding interviews, including Sliding Window, Two Pointers, and Dynamic Programming. Each pattern is associated with common data structures and includes links to relevant LeetCode problems for practice. Additionally, it lists extra resources like LeetCode 75 and Blind 75 sheets for further study.

Uploaded by

shankarudipthi
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)
21 views2 pages

DSA Pattern CheatSheet LeetCode DS

The document provides a cheat sheet for various data structure and algorithm patterns commonly used in coding interviews, including Sliding Window, Two Pointers, and Dynamic Programming. Each pattern is associated with common data structures and includes links to relevant LeetCode problems for practice. Additionally, it lists extra resources like LeetCode 75 and Blind 75 sheets for further study.

Uploaded by

shankarudipthi
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
You are on page 1/ 2

■ DSA Pattern Cheat Sheet (with Data Structures)

1■■ Sliding Window Pattern


Common Data Structures: Arrays, Strings, HashMap

• https://leetcode.com/problems/longest-substring-without-repeating-characters/

• https://leetcode.com/problems/maximum-sum-subarray-of-size-k/

• https://leetcode.com/problems/longest-repeating-character-replacement/

2■■ Two Pointers Pattern


Common Data Structures: Arrays, Linked List, Strings

• https://leetcode.com/problems/container-with-most-water/

• https://leetcode.com/problems/3sum/

• https://leetcode.com/problems/remove-duplicates-from-sorted-array/

3■■ Fast & Slow Pointers Pattern


Common Data Structures: Linked List, Arrays

• https://leetcode.com/problems/linked-list-cycle/

• https://leetcode.com/problems/middle-of-the-linked-list/

• https://leetcode.com/problems/happy-number/

4■■ Merge Intervals Pattern


Common Data Structures: Arrays, Lists, Sorting
• https://leetcode.com/problems/merge-intervals/

• https://leetcode.com/problems/insert-interval/

• https://leetcode.com/problems/meeting-rooms-ii/

5■■ Cyclic Sort Pattern


Common Data Structures: Arrays

• https://leetcode.com/problems/missing-number/

• https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array/

• https://leetcode.com/problems/find-the-duplicate-number/

6■■ Binary Search Pattern


Common Data Structures: Arrays, Binary Search Tree

• https://leetcode.com/problems/binary-search/
• https://leetcode.com/problems/search-in-rotated-sorted-array/

• https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/

7■■ Top K Elements (Heap) Pattern


Common Data Structures: Heaps, Priority Queue

• https://leetcode.com/problems/top-k-frequent-elements/

• https://leetcode.com/problems/kth-largest-element-in-an-array/

• https://leetcode.com/problems/find-k-closest-elements/

8■■ BFS / DFS (Tree/Graph Traversal) Pattern


Common Data Structures: Trees, Graphs, Queue, Stack

• https://leetcode.com/problems/binary-tree-level-order-traversal/

• https://leetcode.com/problems/number-of-islands/

• https://leetcode.com/problems/clone-graph/

9■■ Backtracking Pattern


Common Data Structures: Recursion, Arrays, Strings

• https://leetcode.com/problems/subsets/

• https://leetcode.com/problems/combination-sum/

• https://leetcode.com/problems/permutations/

■ Dynamic Programming Pattern


Common Data Structures: Arrays, Matrix, HashMap

• https://leetcode.com/problems/climbing-stairs/

• https://leetcode.com/problems/coin-change/

• https://leetcode.com/problems/longest-increasing-subsequence/

■ Extra DSA Sheets


• LeetCode 75 Sheet: https://leetcode.com/studyplan/leetcode-75/

• Blind 75 Sheet:
https://leetcode.com/discuss/general-discussion/460599/blind-75-leetcode-questions

• Striver's SDE Sheet:


https://takeuforward.org/interviews/strivers-sde-sheet-top-coding-interview-problems/

• NeetCode 150 Sheet: https://neetcode.io/practice

• Love Babbar 450 DSA Sheet: https://450dsa.com/

You might also like