1 Two Sum
Practice basic array manipulations
LeetCode Link
2 Subarray Sum Equals K
Find the total number of continuous subarrays
whose sum equals K
LeetCode Link
3 Maximum Product Subarray
Find the subarray with the largest product.
LeetCode Link
www.learnbay.co
4 Kadane's Algorithm
Find the maximum sum subarray
LeetCode Link
5 Merge Intervals
Merge overlapping intervals.
LeetCode Link
www.learnbay.co
Dynamic Programming
6 Climbing Stairs
Find the number of ways to climb a staircase
with n steps
LeetCode Link
7 Longest Increasing Subsequence
Find the length of the longest increasing
subsequence.
LeetCode Link
www.learnbay.co
8 0/1 Knapsack
Determine the maximum value in a knapsack
LeetCode Link
9 Coin Change
Find the minimum number of coins to make
up a given amount.
LeetCode Link
10 Edit Distance
Calculate the minimum edit operations to
convert one string to another
LeetCode Link
www.learnbay.co
Graph Algorithms
11 Depth First Search (DFS)
Traverse a graph using DFS
LeetCode Link
12 Breadth First Search (BFS)
Traverse a graph using BFS.
LeetCode Link
13 Dijkstra’s Shortest Path
Find the shortest path in a weighted graph
LeetCode Link
www.learnbay.co
14 Topological Sort
Order vertices in a Directed Acyclic Graph (DAG).
LeetCode Link
15 Detect Cycle in a Graph
Check if a cycle exists in a directed graph.
LeetCode Link
www.learnbay.co
String Problems
16 Longest Palindromic Substring
Find the longest substring that is a palindrome.
LeetCode Link
17 Anagrams in a String
Find all anagrams of a pattern in a string.
LeetCode Link
18 Longest Common Subsequence
Find the length of the longest subsequence
common to two strings
LeetCode Link
www.learnbay.co
19 String Compression
Compress a string using basic string
compression techniques
LeetCode Link
20 Minimum Window Substring
Find the smallest substring of s containing all
characters of t.
LeetCode Link
www.learnbay.co
Tree and Binary Search Tree
21 Inorder Traversal
Perform an inorder traversal of a binary tree
LeetCode Link
22 Level Order Traversal
Traverse a binary tree level by level.
LeetCode Link
23 Lowest Common Ancestor
Find the lowest common ancestor of two nodes
in a BST.
LeetCode Link
www.learnbay.co
24 Binary Tree Maximum Path Sum
Find the maximum path sum in a binary tree.
LeetCode Link
25 Check if a Tree is Balanced
Determine if a binary tree is height-balanced.
LeetCode Link
www.learnbay.co
Heap and Priority Queue
26 Kth Largest Element in an Array
Find the kth largest element in an array.
LeetCode Link
27 Top K Frequent Elements
Find the top k most frequent elements in an
array.
LeetCode Link
28 Merge K Sorted Lists
Merge k sorted linked lists into one sorted lis
LeetCode Link
www.learnbay.co
29 Median of Two Sorted Arrays
Find the median of two sorted arrays.
LeetCode Link
30 Find Median from Data Stream
Maintain a running median as numbers are
added.
LeetCode Link
www.learnbay.co
Bit Manipulation
31 Single Numbe
Find the number that appears only once in
an array
LeetCode Link
32 Counting Bits
Count the number of 1s in binary representations
of numbers.
LeetCode Link
33 Power of Two
Check if a number is a power of two
LeetCode Link
www.learnbay.co
34 Hamming Distance
Calculate the Hamming distance between two
integers.
LeetCode Link
35 Reverse Bits
Reverse the bits of a given 32-bit unsigned
integer
LeetCode Link
www.learnbay.co
Greedy Algorithms
36 Jump Game
Determine if you can reach the last index
in an array.
LeetCode Link
37 Gas Station
Find the starting gas station to complete a
circular route.
LeetCode Link
38 Assign Cookies
Distribute cookies to children to maximize
satisfaction.
LeetCode Link
www.learnbay.co
39 Can Place Flowers
Determine if a certain number of flowers can be
planted
LeetCode Link
40 Non-overlapping Intervals
Find the minimum number of intervals to
remove to make the rest non-overlapping.
LeetCode Link
www.learnbay.co
Others
41 LRU Cache
Design a data structure for an LRU Cache
LeetCode Link
42 Min Stack
Design a stack that supports push, pop, top,
and retrieving the minimum element
LeetCode Link
43 Design Twitter
Design a simplified version of Twitter
LeetCode Link
www.learnbay.co
44 Word Search
Find a word in a 2D grid.
LeetCode Link
45 Rotting Oranges
Calculate the time required to rot all oranges
in a grid
LeetCode Link
46 Trapping Rain Water
Calculate how much rainwater can be
trapped
LeetCode Link
www.learnbay.co
47 Valid Parentheses
Check if a string of parentheses is valid.
LeetCode Link
48 Generate Parentheses
Generate all valid combinations of parentheses
LeetCode Link
49 Container With Most Water
Find two lines that form a container with the
most water.
LeetCode Link
www.learnbay.co
50 Game of Life
Implement Conway's Game of Life.
LeetCode Link
www.learnbay.co
www.learnbay.co