Skip to content

Neetcode 150

Commonly used algorithms

Strings => Z Function Pattern Match

Arrays & Hashing

ProblemsTagsReferences
Contains Duplicate easy notes | link
Valid Anagram easy notes | link
Two Sum easy notes | link
Group Anagrams medium notes | link
Top K Frequent Elements medium notes | link
Encode and Decode Strings medium notes | link
⭐Product of Array Except Self medium notes | link
Valid Sudoku medium notes | link
⭐Longest Consecutive Sequence medium notes | link

Two Pointers

ProblemsTagsReferences
Valid Palindrome easy notes | link
Two Sum II Input Array Is Sorted medium notes | link
⭐3Sum medium notes | link
Container With Most Water medium notes | link
⭐Trapping Rain Water hard notes | link

Sliding Window

ProblemsTagsReferences
Best Time to Buy And Sell Stock easy notes | link
Longest Substring Without Repeating Characters medium notes | link
⭐Longest Repeating Character Replacement medium notes | link
Permutation In String medium notes | link
⭐Minimum Window Substring hard notes | link
Sliding Window Maximum hard notes | link

Stack

ProblemsTagsReferences
Valid Parentheses easy notes | link
Min Stack medium notes | link
Evaluate Reverse Polish Notation medium notes | link
Daily Temperatures medium notes | link
⭐Car Fleet medium notes | link
⭐Largest Rectangle In Histogram hard notes | link

Refresher

ProblemsTagsReferences
Binary Search easy notes | link
Search a 2D Matrix medium notes | link
Koko Eating Bananas medium notes | link
Find Minimum In Rotated Sorted Array medium notes | link
Search In Rotated Sorted Array medium notes | link
Time Based Key Value Store medium notes | link
⭐Median of Two Sorted Arrays hard notes | link

Linked List

Floyd's Cycle Detection

ProblemsTagsReferences
Reverse Linked List easy notes | link
Merge Two Sorted Lists easy notes | link
Linked List Cycle easy notes | link
⭐Reorder List medium notes | link
Remove Nth Node From End of List medium notes | link
Copy List With Random Pointer medium notes | link
Add Two Numbers medium notes | link
Find The Duplicate Number medium notes | link
⭐LRU Cache medium notes | link
Merge K Sorted Lists hard notes | link
⭐Reverse Nodes In K Group hard notes | link

Trees

Refresher

Problems Tags References
Invert Binary Tree easy notes | link
Maximum Depth of Binary Tree easy notes | link
Diameter of Binary Tree easy notes | link
Balanced Binary Tree easy notes | link
Same Tree easy notes | link
Subtree of Another Tree easy notes | link
Lowest Common Ancestor of a Binary Search Tree medium notes | link
Binary Tree Level Order Traversal medium notes | link
Binary Tree Right Side View medium notes | link
Count Good Nodes In Binary Tree medium notes | link
Validate Binary Search Tree medium notes | link
⭐Kth Smallest Element in a BST medium notes | link
Construct Binary Tree From Preorder And Inorder Traversal medium notes | link
⭐Binary Tree Maximum Path Sum hard notes | link
Serialize And Deserialize Binary Tree hard notes | link