130 Most Popular Leetcode Problems to crack coding interviews
3 min readJul 21, 2023
I am currently working as SDE-II at Amazon. Here are some problems that are popular and will help in clearing coding interviews.
LeetCode covers a wide range of topics related to Data Structures, Algorithms, and various programming concepts. Here are the main topics that I have covered :
- Array
- String
- Linked List
- Stack
- Queue
- Binary Tree
- Binary Search Tree (BST)
- Graph
- Hashing
- Dynamic Programming
- Greedy Algorithms
- Backtracking
- Divide and Conquer
- Two Pointers
- Sliding Window
- Bit Manipulation
- Sorting and Searching
- Math
- Recursion
- Design and Implementation
- Union Find (Disjoint Set)
- Trie
- Heap (Priority Queue)
- Topological Sort
- Breadth-First Search (BFS)
- Depth-First Search (DFS)
- Segment Tree
- Fenwick Tree (Binary Indexed Tree)
- Linked List Manipulation
- Tree Traversals
- Geometry
Array:
String:
- Longest Substring Without Repeating Characters
- Valid Parentheses
- Valid Palindrome
- Reverse Words in a String
- Longest Palindromic Substring
Linked List:
- Reverse Linked List
- Merge Two Sorted Lists
- Remove Nth Node From End of List
- Linked List Cycle
- Intersection of Two Linked Lists
Stack:
Queue:
- Design Circular Queue
- Implement Stack using Queues
- Moving Average from Data Stream
- Queue Reconstruction by Height
- Number of Recent Calls
Binary Tree:
- Maximum Depth of Binary Tree
- Validate Binary Search Tree
- Binary Tree Level Order Traversal
- Lowest Common Ancestor of a Binary Tree
- Symmetric Tree
Binary Search Tree (BST):
- Kth Smallest Element in a BST
- Convert Sorted Array to Binary Search Tree
- Validate Binary Search Tree
- Inorder Successor in BST
- Range Sum of BST
Graph:
Hashing:
Dynamic Programming:
Greedy Algorithms:
- Jump Game
- Task Scheduler
- Minimum Number of Arrows to Burst Balloons
- Non-overlapping Intervals
- Gas Station
Backtracking:
Divide and Conquer:
- Merge Sort
- Quick Sort
- Kth Largest Element in an Array
- Maximum Subarray
- Count of Smaller Numbers After Self
Two Pointers:
Sliding Window:
- Minimum Window Substring
- Maximum Points You Can Obtain from Cards
- Fruit Into Baskets
- Longest Repeating Character Replacement
Bit Manipulation:
Sorting and Searching:
- Merge Intervals
- First Missing Positive
- Search in Rotated Sorted Array
- Find First and Last Position of Element in Sorted Array
Math:
Recursion:
Design and Implementation:
Union Find (Disjoint Set):
Trie:
Heap (Priority Queue):
Topological Sort:
Breadth-First Search (BFS):
Depth-First Search (DFS):
- Binary Tree Paths
- Flatten Binary Tree to Linked List
- Word Break
- Remove Invalid Parentheses
- All Paths From Source to Target
Segment Tree:
Fenwick Tree (Binary Indexed Tree):
Linked List Manipulation:
Tree Traversals:
- Binary Tree Preorder Traversal
- Binary Tree Inorder Traversal
- Binary Tree Postorder Traversal
- N-ary Tree Preorder Traversal
- N-ary Tree Postorder Traversal
- Lowest Common Ancestor of a Binary Search Tree
Geometry:
Good luck on your job preparation and coding interviews!