0% found this document useful (0 votes)
3 views1 page

Leetcode Pattern Sheet

The document lists various coding problems from LeetCode along with their links, patterns/topics, and difficulty levels. It provides a brief explanation of the approach for solving each problem, highlighting the techniques and data structures involved. The problems range from easy to hard and cover a variety of topics such as HashMap, Two Pointers, Sliding Window, and Dynamic Programming.
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)
3 views1 page

Leetcode Pattern Sheet

The document lists various coding problems from LeetCode along with their links, patterns/topics, and difficulty levels. It provides a brief explanation of the approach for solving each problem, highlighting the techniques and data structures involved. The problems range from easy to hard and cover a variety of topics such as HashMap, Two Pointers, Sliding Window, and Dynamic Programming.
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

Problem #,Problem Name,LeetCode Link,Pattern / Topic,Difficulty,Why This Pattern,Approach

Summary,Recommended Order,Progress 1,Two Sum,[Link]


sum/,HashMap / Set,Easy,HashMap allows O(n) lookup for complement,Use HashMap to store seen
numbers and check complement,1,Not Started 2,3Sum,[Link]
Pointers / Sorting,Medium,Sorted array allows two pointers to find triplets,Sort array and use two
pointers for sum of zero,2,Not Started 3,Container With Most Water,[Link]
container-with-most-water/,Two Pointers,Medium,Two pointers from both ends maximize area,Move
pointers towards each other based on height,3,Not Started 4,Valid Palindrome,[Link]
problems/valid-palindrome/,Two Pointers / String,Easy,Check characters from both ends,Use two
pointers to compare start and end,4,Not Started 5,Reverse String,[Link]
reverse-string/,Two Pointers / String,Easy,Swap characters from both ends,Two pointers swap while
moving towards center,5,Not Started 6,Longest Substring Without Repeating Characters,https://
[Link]/problems/longest-substring-without-repeating-characters/,Sliding
Window,Medium,Maintain a window of unique characters,Expand window, shrink when duplicate
found,6,Not Started 7,Minimum Window Substring,[Link]
substring/,Sliding Window,Hard,Expand/contract window to satisfy all chars,Use two pointers and
hashmap counts,7,Not Started 8,Linked List Cycle,[Link]
& Slow Pointers,Easy,Detect cycle by two pointers moving at different speeds,Move slow by 1 and fast by
2, check for meet,8,Not Started 9,Middle of the Linked List,[Link]
the-linked-list/,Fast & Slow Pointers,Easy,Slow reaches middle when fast reaches end,Move slow by 1,
fast by 2, return slow,9,Not Started 10,Merge Two Sorted Lists,[Link]
two-sorted-lists/,Linked List / Two Pointers,Easy,Merge while maintaining order,Compare nodes and
attach to new list,10,Not Started 11,Maximum Depth of Binary Tree,[Link]
maximum-depth-of-binary-tree/,DFS / Recursion,Easy,DFS explores each branch fully,Recursively
compute max depth of left/right,11,Not Started 12,Number of Islands,[Link]
number-of-islands/,DFS / Grid,Medium,DFS finds connected components,DFS recursively marks visited
land,12,Not Started 13,Binary Tree Level Order Traversal,[Link]
level-order-traversal/,BFS / Queue,Medium,BFS explores level by level,Use queue to traverse tree level-
wise,13,Not Started 14,Climbing Stairs,[Link]
Programming,Easy,Optimal substructure,Ways[n] = Ways[n-1]+Ways[n-2],14,Not Started 15,House
Robber,[Link] Programming,Medium,Overlapping
subproblems,DP[i] = max(DP[i-1], DP[i-2]+nums[i]),15,Not Started 16,Merge Intervals,https://
[Link]/problems/merge-intervals/,Intervals / Sorting,Medium,Sort by start to merge
overlaps,Sort intervals, merge if overlapping,16,Not Started 17,SQL Basics - Employees,https://
[Link]/problemset/database/,SQL,Easy,Learn SELECT, WHERE, JOIN,Basic queries with SELECT
and JOIN,17,Not Started 18,Math Puzzle - Ugly Number,[Link]
number/,Math / Factorization,Easy,Check factors 2,3,5,Divide n by 2,3,5 until 1,18,Not Started

You might also like