Coding Problems
Coding Problems
Coding Problems
CONTENT:
1. ARRAYS
2. STRINGS
5. BIT MANIPULATION
6. HASHMAP
7. HEAPS
8. BINARY SEARCH
9. LINKEDLIST
11. TREES
12. TRIE
14. GRAPHS
no Questions Done
ARRAYS
1 Rotate Array
2 Squares of a sorted array
3 Kadane's Algo
4 Check if Array Is Sorted and Rotated - LeetCode
5 Remove Duplicates from Sorted Array - LeetCode
6 Move Zeroes - LeetCode
7 Max Consecutive Ones - LeetCode
8 Single Number - LeetCode
9 Two Sum - LeetCode
10 Sort Colors - LeetCode
11 maximum product subarray
12 majority element
13 majority element 2
14 Next Greater Element III
15 Max chunks to make sorted
16 Max Chunks To Make Sorted II
17 number of subarrays with bounded maximum
18 First missing positive
19 Range Addition
20 Min No. of Platform
21 Trapping rain water
22 Best Time to Buy and Sell Stock - LeetCode
STRINGS
47 Permutations
48 Permutation Sequence
49 Combination Sum
50 Cmbination Sum 2
51 Letter combination of Phone number
52 N Queens
53 Rat in a Maze Path
BIT MANIPULATION
54 Single Element
55 Single Element 2
56 Single Number 3
57 Divide 2 Integers
58 Max AND Pair.
HASHMAP
59 Check AP sequence
60 Grid illumination
61 Brick wall
62 Count of subarray with sum = k
63 Subarray sum divisible by K
64 Insert Delete GetRandom O(1)
65 Insert delete get random duplicates allowed
66 Longest consecutive sequence
67 Find all anagrams in a string
68 Find smallest size of string containing all char of other
69 Write hashmap
70 subarray with equal number of 0 and 1
71 Substring with equal 0 1 and 2
HEAPS
BINARY SEARCH
LINKEDLIST
83 reverse LinkedList
84 Find the middle element
85 Floyd cycle
86 Intersection point of 2 linked list
87 LRU Cache
TREES
97 Preorder Traversal
98 Inorder Traversal
99 Postorder Traversal
100 right side view
101 Left View
102 Top View
103 Bottom View
104 Vertical order
105 Diagonal Traversal
106 Boundary Traversal
107 Binary Tree Cameras
108 Max path sum
109 Delete node in bst
110 Construct from inorder and preorder
111 Next right pointer in each node
112 Convert a binary tree to circular doubly linked list
113 Conversion of sorted DLL to BST
114 Lowest common ancestor
115 serialize and deserialise
TRIE
DYNAMIC PROGRAMMING
120 longest increasing subsequence
121 longest increasing subsequence
122 building bridges
123 Russian doll envelopes
124 Box stacking
125 Paint house
126 No. of binary string without consecutive 1
127 Possible ways to construct the building
128 Total no. of bst
129 No. of balanced parentheses sequence
130 Min cost path
131 Cherry pickup
132 Cherry pickup 2
133 best time to buy and sell stock
134 best time to buy and sell 2
135 buy and sell with transaction fee
136 best time to buy and sell with cool down
137 best time to buy and sell 3
138 best time to but and sell 4
139 burst balloons
140 Optimal BST
141 Matrix chain multiplication
142 Longest common subsequence
143 Count all pallindromic subsequence
144 Count distinct pallindromic subsequence
145 No. of sequence of type a^i+b^j+c^k
146 2 egg 100 floor
146 egg drop
148 Regular Expression Matching
149 Palindrome partitioning
150 Frog jump
151 Edit Distance
152 0-1 Knapsack
153 unbounded knapsack
154 Fractional knapsack
155 Coin change combination
156 Coin change permutation
GRAPHS