A job at MAANG comes with global acknowledgment, huge opportunities for growth and exposure, hefty salary packages, and perks. Due to these excellent career opportunities, MAANG companies tempt all career-seekers.
The interview is one of the most grueling phases of a job seeker’s life. In fact, the interview process at Facebook, Apple, Amazon, Netflix, and Google, among many other top tech companies, is unlike anything that job seekers have ever experienced. Not only are the applications notoriously difficult, but their interviews are wild.
The most coveted career goals of all tech graduates are to get a job at FAANG (Facebook, Amazon, Apple, Netflix & Google) companies. This is mainly because their work culture is quite balanced and directed towards maximum productivity. Along with that their career growth options and trajectory are fascinating and the astounding salary just adds a cherry on top of the icing.
You can practice the below MAANG Interview Questions for the interview. We have collected past MAANG Interview Questions for your reference.
S.No | Interview Question | Number of times asked |
---|
1 | Two Sum Leetcode Solution | 38040 |
2 | Maximum occurring character in a string | 18439 |
3 | Plus One Leetcode Solution | 17435 |
4 | Valid Parentheses LeetCode Solution | 17076 |
5 | 3Sum Leetcode Solution | 14856 |
6 | First Repeating Element | 13839 |
7 | Single Number Leetcode Solution | 13155 |
8 | Count Primes Leetcode Solutions | 12886 |
9 | Merge Sorted Arrays Leetcode Solution | 12493 |
10 | Pow(x, n) Leetcode Solution | 12484 |
11 | Sqrt(x) Leetcode Solution | 12283 |
12 | Meeting Rooms II LeetCode Solution | 11706 |
13 | Concatenation of Array LeetCode Solution | 11373 |
14 | Roman to Integer Leetcode Solution | 10639 |
15 | Contains Duplicate II Leetcode Solution | 10561 |
16 | Palindrome Number LeetCode Solution | 10369 |
17 | Search Insert Position Leetcode Solution | 10320 |
18 | Valid Palindrome Leetcode Solution | 10202 |
19 | Reverse Vowels of a String Leetcode Solution | 9846 |
20 | Jump Game Leetcode Solution | 9805 |
21 | Intersection of Two Arrays II Leetcode Solution | 9588 |
22 | Number of Good Pairs Leetcode Solution | 9544 |
23 | Kids With the Greatest Number of Candies Leetcode Solution | 9439 |
24 | Spiral Matrix LeetCode Solution | 9416 |
25 | House Robber Leetcode Solution | 9358 |
26 | Longest Substring Without Repeating Characters LeetCode Solution | 9290 |
27 | Add Binary Leetcode Solution | 9215 |
28 | Find the Maximum Repeating Number in Array | 9046 |
29 | Text Justification LeetCode Solution | 8900 |
30 | Maximum Subarray Leetcode Solution | 8682 |
31 | Number Of 1 bits | 8662 |
32 | Longest Palindromic Substring LeetCode Solution | 8650 |
33 | Remove Duplicates from Sorted Array Leetcode Solution | 8552 |
34 | Jewels and Stones Leetcode Solution | 8511 |
35 | Power of Two Leetcode Solution | 8431 |
36 | Permutations Leetcode Solution | 8361 |
37 | Min Stack Leetcode Solution | 8225 |
38 | Shuffle String Leetcode Solution | 8223 |
39 | Find All Numbers Disappeared in an Array Leetcode Solution | 8176 |
40 | Move Zeroes LeetCode Solution | 8098 |
41 | Daily Temperatures Leetcode Solution | 8037 |
42 | Next Permutation Leetcode Solution | 8005 |
43 | Word Search Leetcode Solution | 8000 |
44 | Number of Islands LeetCode Solution | 7979 |
45 | Kth Missing Positive Number Leetcode Solution | 7929 |
46 | Maximum Profit in Job Scheduling Leetcode Solution | 7903 |
47 | Median of Two Sorted Arrays LeetCode Solution | 7891 |
48 | Longest Common Prefix Leetcode Solution | 7858 |
49 | Frog Jump Leetcode Solution | 7819 |
50 | Third Maximum Number Leetcode Solution | 7757 |
51 | Running Sum of 1d Array Leetcode Solution | 7677 |
52 | Find Minimum Distance Between Two Numbers in an Array | 7635 |
53 | Next Greater Element I Leetcode Solution | 7613 |
54 | Search in Rotated Sorted Array Leetcode Solution | 7541 |
55 | Can Place Flowers LeetCode Solution | 7507 |
56 | Rotate Image LeetCode Solution | 7487 |
57 | Shuffle the Array Leetcode Solution | 7415 |
58 | Multiply Strings Leetcode Solution | 7404 |
59 | Combination Sum Leetcode Solution | 7393 |
60 | Bulb Switcher LeetCode Solution | 7349 |
61 | 3Sum Closest LeetCode Solution | 7330 |
62 | Valid Anagram Leetcode Solution | 7254 |
63 | House Robber II Leetcode Solution | 7241 |
64 | Count and Say Leetcode Solution | 7220 |
65 | Missing Number Leetcode Solution | 7060 |
66 | Subarray and Subsequence | 7057 |
67 | Evaluation of Postfix Expression | 7028 |
68 | Reverse String Without Temporary Variable | 7009 |
69 | Isomorphic Strings Leetcode Solution | 6997 |
70 | Strobogrammatic Number LeetCode Solution | 6994 |
71 | Excel Sheet Column Title Leetcode Solution | 6959 |
72 | Koko Eating Bananas Leetcode Solution | 6952 |
73 | Integer to Roman Leetcode Solution | 6933 |
74 | Product of array except self | 6914 |
75 | Count Pairs With Given Sum | 6845 |
76 | Rotate String LeetCode Solution | 6839 |
77 | Majority Element Leetcode Solution | 6708 |
78 | Happy Number Leetcode Solution | 6668 |
79 | Find the Difference Leetcode Solution | 6658 |
80 | String to Integer (atoi) LeetCode Solution | 6642 |
81 | Candy LeetCode Solution | 6625 |
82 | Subtract the Product and Sum of Digits of an Integer Leetcode Solution | 6609 |
83 | Find Common Characters Leetcode Solution | 6554 |
84 | Largest Number Leetcode Solution | 6543 |
85 | Is Subsequence Leetcode Solution | 6496 |
86 | How Many Numbers Are Smaller Than the Current Number Leetcode Solution | 6434 |
87 | Set Matrix Zeroes | 6410 |
88 | Balanced Binary Tree Leetcode Solution | 6336 |
89 | Best Time to Buy and Sell Stock LeetCode Solution | 6306 |
90 | Subset Leetcode | 6303 |
91 | Summary Ranges Leetcode Solution | 6302 |
92 | Word Pattern LeetCode Solution | 6281 |
93 | Find the Town Judge Leetcode Solution | 6259 |
94 | Unique Paths Leetcode Solution | 6205 |
95 | Arranging Coins Leetcode Solution | 6148 |
96 | Find the Duplicate Number LeetCode Solution | 6146 |
97 | Smallest window in a string containing all characters of another string | 6144 |
98 | Binary Search LeetCode Solution | 6127 |
99 | Sort Characters By Frequency LeetCode Solution | 6115 |
100 | Rearrange Positive and Negative Numbers Alternatively in Array | 6112 |
101 | Sort Colors LeetCode Solution | 6095 |
102 | Find the Winner of the Circular Game LeetCode Solution | 6034 |
103 | String Compression LeetCode Solution | 6030 |
104 | A Product Array Puzzle | 6028 |
105 | Asteroid Collision LeetCode Solution | 6002 |
106 | Repeated Substring Pattern LeetCode Solution | 5978 |
107 | Expression Evaluation | 5954 |
108 | Rabin Karp Algorithm | 5949 |
109 | Zigzag Conversion LeetCode Solution | 5823 |
110 | Best Time to Buy and Sell Stock II Leetcode Solution | 5813 |
111 | Valid Palindrome II Leetcode Solution | 5803 |
112 | Sort Array By Parity LeetCode Solution | 5788 |
113 | Sum of minimum and maximum elements of all subarrays of size k | 5757 |
114 | Group Anagrams LeetCode Solution | 5756 |
115 | Divide Two Integers Leetcode Solution | 5723 |
116 | Product of Array Except Self LeetCode Solution | 5707 |
117 | Reverse Integer Leetcode Solution | 5701 |
118 | Linked List Cycle II LeetCode Solution | 5655 |
119 | Page Replacement Algorithms in Operating Systems | 5592 |
120 | Bus Routes Leetcode Solution | 5578 |
121 | Merge Two Sorted Lists Leetcode Solutions | 5545 |
122 | Pascal Triangle Leetcode | 5522 |
123 | Matrix Chain Multiplication using Dynamic Programming | 5520 |
124 | Postfix to Infix Conversion | 5511 |
125 | Kth largest element in an Array Leetcode Solutions | 5507 |
126 | Employee Free Time LeetCode Solution | 5494 |
127 | Length of Last Word Leetcode Solution | 5478 |
128 | Assign Cookies Leetcode Solution | 5465 |
129 | Generate Parentheses Leetcode Solution | 5445 |
130 | Number of Provinces Leetcode Solution | 5438 |
131 | Minimum Cost For Tickets Leetcode Solution | 5428 |
132 | First element occurring k times in an array | 5395 |
133 | Remove Duplicates from Sorted Array II Leetcode Solution | 5392 |
134 | Minimum Steps to reach target by a Knight | 5380 |
135 | H-Index Leetcode Solution | 5377 |
136 | Decode String Leetcode Solution | 5376 |
137 | Optimal Account Balancing LeetCode Solution | 5372 |
138 | Build Array From Permutation Leetcode Solution | 5367 |
139 | Increasing Triplet Subsequence LeetCode Solution | 5318 |
140 | Convert array into Zig-Zag fashion | 5304 |
141 | Defanging an IP Address Leetcode Solution | 5274 |
142 | Implementation of Deque using Doubly Linked List | 5256 |
143 | Fibonacci Number LeetCode Solution | 5200 |
144 | Pascal’s Triangle II Leetcode Solution | 5161 |
145 | Robot Room Cleaner Leetcode Solution | 5140 |
146 | Swap Nodes in Pairs Leetcode Solutions | 5108 |
147 | Island Perimeter Leetcode Solution | 5103 |
148 | KMP Algorithm | 5101 |
149 | Bellman Ford Algorithm | 5090 |
150 | First Unique Character in a String LeetCode Solution | 5041 |
151 | Prefix to Infix Conversion | 5022 |
152 | K-th Smallest Element in a Sorted Matrix | 5014 |
153 | Check if the Elements of an Array are Consecutive | 5010 |
154 | Max Consecutive Ones Leetcode Solution | 5008 |
155 | Subarray with Given Sum | 4973 |
156 | Length of the largest subarray with contiguous elements | 4970 |
157 | OSI Model | 4970 |
158 | Guess Number Higher or Lower LeetCode Solution | 4967 |
159 | Find First and Last Position of Element in Sorted Array Leetcode Solution | 4963 |
160 | Find Smallest Missing Number in a Sorted Array | 4940 |
161 | Find the Missing Number | 4938 |
162 | Find Pair with Given Difference | 4925 |
163 | Subarray Product Less Than K LeetCode Solution | 4920 |
164 | Last Stone Weight | 4913 |
165 | Add Two Numbers II Leetcode Solution | 4909 |
166 | Majority Element II Leetcode Solution | 4906 |
167 | Lemonade Change Leetcode Solution | 4905 |
168 | Coin Change 2 Leetcode Solution | 4898 |
169 | Design Parking System Leetcode Solution | 4897 |
170 | Subarray Sum Equals K LeetCode Solution | 4871 |
171 | Reverse Words in a String III LeetCode Solution | 4860 |
172 | Delete middle element of a stack | 4856 |
173 | Capacity To Ship Packages Within D Days Leetcode Solution | 4852 |
174 | First negative integer in every window of size k | 4850 |
175 | Find the Row with Maximum Number of 1’s | 4833 |
176 | Form Minimum Number from Given Sequence of D’s and I’s | 4829 |
177 | String Compression | 4815 |
178 | Palindrome Linked List Leetcode Solution | 4784 |
179 | Trapping Rain Water Leetcode Solution | 4777 |
180 | Find All Duplicates in an Array LeetCode Solution | 4753 |
181 | Combinations Leetcode Solution | 4743 |
182 | Word Ladder LeetCode Solution | 4730 |
183 | Repeated Substring Pattern | 4686 |
184 | Iterative Implementation of Quick Sort | 4682 |
185 | Merge Sorted Array LeetCode Solution | 4681 |
186 | Remove Duplicates from Sorted List II LeetCode Solution | 4675 |
187 | Backspace String Compare | 4674 |
188 | Remove Linked List Elements Leetcode Solution | 4673 |
189 | Same Tree LeetCode Solution | 4658 |
190 | Break a Palindrome LeetCode Solution | 4651 |
191 | Monotonic Array LeetCode Solution | 4642 |
192 | Continuous Subarray Sum LeetCode Solution | 4619 |
193 | 01 Matrix LeetCode Solution | 4597 |
194 | Single Element in a Sorted Array LeetCode Solution | 4535 |
195 | Merge k Sorted Lists Leetcode Solution | 4535 |
196 | Slowest Key Leetcode Solution | 4524 |
197 | Valid Perfect Square Leetcode Solution | 4507 |
198 | Remove All Occurrences of a Substring LeetCode Solution | 4502 |
199 | Leetcode Permutations | 4502 |
200 | Set Matrix Zeroes Leetcode Solution | 4448 |
201 | Insert Delete GetRandom O(1) Leetcode Solution | 4441 |
202 | Second Most Repeated Word in a Sequence | 4440 |
203 | Rearrange given Array in Maximum Minimum Form | 4439 |
204 | Combination Sum | 4434 |
205 | Find Peak Element LeetCode Solution | 4428 |
206 | Make The String Great Leetcode Solution | 4421 |
207 | The K Weakest Rows in a Matrix Leetcode Solution | 4410 |
208 | Rotate List Leetcode Solution | 4395 |
209 | Kth Largest Element in a Stream Leetcode Solution | 4390 |
210 | Relative Ranks Leetcode Solution | 4389 |
211 | Palindrome Number | 4389 |
212 | Printing brackets in Matrix Chain Multiplication Problem | 4389 |
213 | Convert a Number to Hexadecimal Leetcode Solution | 4377 |
214 | Longest Common Subsequence LeetCode Solution | 4375 |
215 | Time Based Key-Value Store LeetCode Solution | 4375 |
216 | Relative Sort Array Leetcode Solution | 4348 |
217 | Find the Duplicate Element | 4340 |
218 | Subarray Sum Equals k | 4334 |
219 | Find N Unique Integers Sum up to Zero Leetcode Solution | 4332 |
220 | Cuckoo sequence program | 4332 |
221 | Top K Frequent Elements LeetCode Solution | 4324 |
222 | Delete Node in a Linked List Leetcode Solution | 4323 |
223 | Number of Dice Rolls With Target Sum LeetCode Solution | 4316 |
224 | Max Area of Island | 4316 |
225 | Target Sum | 4312 |
226 | Moving Average from Data Stream Leetcode Solution | 4290 |
227 | Prefix to Postfix Conversion | 4288 |
228 | Generate all Binary Strings Without Consecutive 1’s | 4288 |
229 | Permutation in String Leetcode Solution | 4267 |
230 | Maximum Product of Three Numbers LeetCode Solution | 4260 |
231 | LRU Cache LeetCode Solution | 4252 |
232 | Find Leaders in an Array | 4235 |
233 | Check If Two String Arrays are Equivalent Leetcode Solution | 4231 |
234 | N-Queens LeetCode Solution | 4200 |
235 | Letter Combinations of a Phone Number | 4198 |
236 | Minimum Knight Moves LeetCode Solution | 4187 |
237 | Count Good Nodes in Binary Tree Leetcode Solution | 4180 |
238 | Unique Paths II Leetcode Solution | 4175 |
239 | Reverse Only Letters LeetCode Solution | 4169 |
240 | Find Triplet in Array With a Given Sum | 4155 |
241 | Scramble String | 4154 |
242 | Number of Steps to Reduce a Number to Zero Leetcode Solution | 4149 |
243 | Arithmetic Expression Evaluation | 4146 |
244 | Flipping an Image LeetCode Solution | 4102 |
245 | Stock Buy Sell to Maximize Profit | 4078 |
246 | Given two unsorted arrays find all pairs whose sum is x | 4077 |
247 | Minimum swaps required to bring all elements less than or equal to k together | 4066 |
248 | To Lower Case Leetcode Solution | 4064 |
249 | Check If N and Its Double Exist Leetcode Solution | 4060 |
250 | Remove Minimum Characters so that Two Strings Become Anagrams | 4059 |
251 | The kth Factor of n Leetcode Solution | 4041 |
252 | Maximum Population Year LeetCode Solution | 4039 |
253 | Min Cost Climbing Stairs LeetCode Solution | 4032 |
254 | Smallest Positive Number Missing in an Unsorted Array | 4032 |
255 | Student Attendance Record I Leetcode Solution | 4027 |
256 | Top K Frequent Elements | 4019 |
257 | Minimum Operations to convert X to Y | 4010 |
258 | Container With Most Water LeetCode Solution | 4002 |
259 | License Key Formatting Leetcode Solution | 3988 |
260 | Construct Binary Tree from Given Inorder and Preorder Traversals | 3978 |
261 | Next Permutation | 3976 |
262 | Search Suggestions System LeetCode Solution | 3964 |
263 | Prim’s Algorithm | 3953 |
264 | Maximum Subarray Sum using Divide and Conquer | 3950 |
265 | Stone Game LeetCode | 3940 |
266 | Reverse words in a string | 3915 |
267 | Maximum Sum Increasing Subsequence | 3915 |
268 | Find the Number Occurring Odd Number of Times in an Array | 3904 |
269 | Sum of Subarray Ranges Leetcode Solution | 3903 |
270 | Contains Duplicate LeetCode Solution | 3868 |
271 | Top K Frequent Words LeetCode Solution | 3865 |
272 | Min Stack | 3856 |
273 | Find The Duplicate Number | 3852 |
274 | Remove Duplicates from Sorted List LeetCode Solution | 3842 |
275 | Reformat Date LeetCode Solution | 3828 |
276 | Maximize Distance to Closest Person LeetCode Solution | 3816 |
277 | Special Array With X Elements Greater Than or Equal X Leetcode Solution | 3805 |
278 | Find Words That Can Be Formed by Characters Leetcode Solution | 3775 |
279 | BFS for Disconnected Graph | 3772 |
280 | Minimum Characters to be Added at Front to Make String Palindrome | 3767 |
281 | Maximum Depth of Binary Tree Leetcode Solution | 3766 |
282 | Pairs of Songs With Total Durations Divisible by 60 LeetCode Solution | 3763 |
283 | Reverse individual words | 3756 |
284 | Find any one of the multiple repeating elements in read only array | 3755 |
285 | Evaluate Division | 3748 |
286 | Most Frequent Element in an Array | 3744 |
287 | Minimum Path Sum Leetcode Solution | 3732 |
288 | Diagonal Traverse LeetCode Solution | 3731 |
289 | Find if Path Exists in Graph Leetcode Solution | 3719 |
290 | Implement a stack using single queue | 3715 |
291 | Design A Leaderboard Leetcode Solution | 3709 |
292 | Count of index pairs with equal elements in an array | 3706 |
293 | Best Time to Buy and Sell Stock III Leetcode Solution | 3699 |
294 | Sort Elements by Frequency of Occurrences | 3699 |
295 | Reveal Cards In Increasing Order Leetcode Solution | 3690 |
296 | Intersection of Two Arrays | 3678 |
297 | House Robber | 3675 |
298 | Single Number | 3673 |
299 | Last Stone Weight II LeetCode Solution | 3670 |
300 | Arrange given Numbers to Form the Biggest Number II | 3667 |
301 | Longest Common Subsequence | 3662 |
302 | Count Number of Occurrences in a Sorted Array | 3651 |
303 | Remove Nth Node From End of List Leetcode Solution | 3649 |
304 | Minimum number of Merge Operations to make an Array Palindrome | 3638 |
305 | Length of Longest valid Substring | 3634 |
306 | Spiral Matrix II Leetcode Solution | 3623 |
307 | N-th Tribonacci Number Leetcode Solution | 3619 |
308 | Reverse Bits | 3581 |
309 | Diagonal Traversal LeetCode Solution | 3577 |
310 | Invalid Transactions LeetCode Solution | 3568 |
311 | Range Sum Query 2D – Immutable Leetcode Solution | 3567 |
312 | Binary Tree Inorder Traversal LeetCode Solution | 3563 |
313 | Symmetric Tree Leetcode Solution | 3558 |
314 | Sudoku Solver | 3558 |
315 | Find Leaves of Binary Tree LeetCode Solution | 3544 |
316 | Maximum Size Subarray Sum Equals k Leetcode Solution | 3521 |
317 | Shortest Word Distance Leetcode Solution | 3511 |
318 | Special Positions in a Binary Matrix Leetcode Solution | 3507 |
319 | Alien Dictionary LeetCode Solution | 3502 |
320 | Find the Closest Palindrome number | 3499 |
321 | Least Number of Unique Integers after K Removals Leetcode Solution | 3495 |
322 | Brightest Position on Street LeetCode Solution | 3493 |
323 | Mobile Numeric Keypad Problem | 3466 |
324 | Construct BST from its given Level Order Traversal | 3462 |
325 | One Edit Distance LeetCode Solution | 3459 |
326 | Jump Game | 3455 |
327 | Sort Array By Parity II Leetcode Solution | 3453 |
328 | Binary Tree Zigzag Level Order Traversal LeetCode Solution | 3445 |
329 | Lowest Common Ancestor of a Binary Tree Leetcode Solution | 3437 |
330 | Find Index of Closing Bracket for a Given Opening Bracket in an Expression | 3437 |
331 | Partition Array Into Three Parts With Equal Sum Leetcode Solution | 3435 |
332 | Remove All Ones With Row and Column Flips Leetcode Solution | 3434 |
333 | Partition Labels LeetCode Solution | 3431 |
334 | Remove Invalid Parentheses Leetcode Solution | 3424 |
335 | Find Duplicates in an Array in Most Efficient Way | 3422 |
336 | The Celebrity Problem | 3415 |
337 | Round Robin Scheduling | 3408 |
338 | Check whether Strings are K Distance Apart or Not | 3402 |
339 | Next Greater Element III LeetCode Solution | 3397 |
340 | Robot Bounded In Circle LeetCode Solution | 3391 |
341 | Rank Transform of an Array Leetcode Solution | 3385 |
342 | Find Winner on a Tic Tac Toe Game Leetcode Solution | 3383 |
343 | Largest Rectangle in Histogram LeetCode Solution | 3369 |
344 | Clone Graph LeetCode Solution | 3368 |
345 | Reverse Nodes in k-Group LeetCode Solution | 3354 |
346 | Paint House LeetCode Solution | 3351 |
347 | Pair of Positive Negative Values in an Array | 3348 |
348 | Next Permutation LeetCode Solution | 3345 |
349 | Minimum operation to make all elements equal in array | 3343 |
350 | Invert Binary Tree LeetCode Solution | 3334 |
351 | Count of Triplets With Sum Less than Given Value | 3334 |
352 | Unique Paths | 3319 |
353 | Minimum Moves to Equal Array Elements Leetcode Solution | 3315 |
354 | Maximum Circular Subarray Sum | 3312 |
355 | Tug of War | 3308 |
356 | Regular Expression Matching Regular Expression Matching LeetCode Solution | 3300 |
357 | Longest subarray not having more than K distinct elements | 3298 |
358 | Range Sum of BST LeetCode Solution | 3296 |
359 | Minimum Cost to Hire K Workers | 3296 |
360 | Minimum Depth of Binary Tree Leetcode Solution | 3295 |
361 | Minimum Time Visiting All Points Leetcode Solution | 3294 |
362 | String Matching in an Array Leetcode Solution | 3284 |
363 | Maximal Square | 3283 |
364 | Merge Two Sorted Linked Lists | 3277 |
365 | Bitwise AND of Numbers Range LeetCode Solution | 3270 |
366 | Painting Fence Algorithm | 3267 |
367 | K Empty Slots LeetCode | 3267 |
368 | Check if a given array contains duplicate elements within k distance from each other | 3264 |
369 | Find Top K (or Most Frequent) Numbers in a Stream | 3263 |
370 | Smallest Subarray with k Distinct Numbers | 3262 |
371 | Hamming Distance Leetcode Solution | 3258 |
372 | Maximum Length of a Concatenated String with Unique Characters Leetcode Solution | 3253 |
373 | Find minimum difference between any two elements | 3252 |
374 | Longest Common Prefix using Trie | 3245 |
375 | Dijkstra Algorithm | 3245 |
376 | Best Time to Buy and Sell Stock with Cooldown Leetcode Solution | 3238 |
377 | Split Linked List in Parts Leetcode Solution | 3231 |
378 | Find the subarray with least average | 3230 |
379 | Minimum Time to Collect All Apples in a Tree LeetCode Solution | 3224 |
380 | Number of Smaller Elements on Right Side | 3222 |
381 | Longest subsequence such that difference between adjacents is one | 3220 |
382 | Maximum Subarray | 3220 |
383 | Non-decreasing Array LeetCode Solution | 3219 |
384 | Number of Islands II LeetCode Solution | 3213 |
385 | Sliding Window Technique | 3211 |
386 | Find the First and Second Smallest Elements | 3210 |
387 | Find Maximum Level sum in Binary Tree | 3208 |
388 | Combination Sum IV LeetCode Solution | 3206 |
389 | Sort a stack using a temporary stack | 3205 |
390 | Transpose Graph | 3204 |
391 | Design Browser History LeetCode Solution | 3202 |
392 | Permutation Sequence LeetCode Solution | 3202 |
393 | Common elements in all rows of a given matrix | 3196 |
394 | First Circular Tour to Visit all the Petrol Bunks | 3182 |
395 | Minimize Maximum Pair Sum in Array LeetCode Solution | 3178 |
396 | Find the Smallest Divisor given a Threshold Leetcode Solution | 3176 |
397 | LRU Cache Implementation | 3176 |
398 | Ugly Number II LeetCode Solution | 3175 |
399 | Maximum Number of Occurrences of a Substring Leetcode Solution | 3172 |
400 | Missing Element in Sorted Array LeetCode Solution | 3172 |
401 | Minimum Number of Steps to Make Two Strings Anagram Leetcode Solutions | 3171 |
402 | Given an Array of Pairs Find all Symmetric Pairs in it | 3171 |
403 | Implementation of Deque using circular array | 3164 |
404 | Longest Substring with At Most K Distinct Characters LeetCode Solution | 3161 |
405 | Integer Break LeetCode Solution | 3160 |
406 | Unique Paths III LeetCode Solution | 3158 |
407 | Invert Binary Tree LeetCode Solution | 3154 |
408 | Path With Maximum Minimum Value LeetCode Solution | 3154 |
409 | Queries for counts of array elements with values in given range | 3146 |
410 | Graph Valid Tree LeetCode Solution | 3144 |
411 | Longest Palindrome can be Formed by Removing or Rearranging Characters | 3141 |
412 | LRU Cache Leetcode Solution | 3140 |
413 | Priority Queue using doubly linked list | 3131 |
414 | Convert Sorted Array to Binary Search Tree LeetCode Solutions | 3118 |
415 | Find the Peak Element from an Array | 3113 |
416 | Find duplicates in a given array when elements are not limited to a range | 3112 |
417 | Stone Game II Leetcode | 3112 |
418 | K Closest Points to Origin Leetcode Solution | 3102 |
419 | Word Search | 3096 |
420 | Minesweeper LeetCode Solution | 3089 |
421 | Consecutive Characters LeetCode Solution | 3085 |
422 | Max stack | 3083 |
423 | Top View of Binary Tree | 3083 |
424 | Insert Interval Leetcode Solution | 3078 |
425 | Maximum Consecutive Numbers Present in an Array | 3076 |
426 | Toeplitz Matrix | 3074 |
427 | Kth Smallest Element in a BST Leetcode Solution | 3065 |
428 | Partition List Leetcode Solution | 3057 |
429 | Replace Elements with Greatest Element on Right Side Leetcode Solution | 3057 |
430 | Decompress Run-Length Encoded List Leetcode Solution | 3056 |
431 | Odd Even Linked List Leetcode Solution | 3054 |
432 | Validate Stack Sequences LeetCode Solution | 3050 |
433 | Can Make Arithmetic Progression From Sequence Leetcode Solution | 3049 |
434 | Stack Permutations (Check if an array is stack permutation of other) | 3049 |
435 | Design a stack that supports getMin() in O(1) time and O(1) extra space | 3045 |
436 | Snakes and Ladders LeetCode Solution | 3044 |
437 | Sort elements by frequency | 3042 |
438 | Restore IP Addresses Leetcode Solution | 3041 |
439 | Expression Contains Redundant Bracket or Not | 3038 |
440 | Binary Tree Maximum Path Sum LeetCode Solution | 3036 |
441 | Kruskal Algorithm | 3027 |
442 | Minimum Absolute Difference in BST Leetcode Solution | 3023 |
443 | Number of Closed Islands Leetcode Solution | 3021 |
444 | Nth Catalan Number | 3019 |
445 | Search in a Binary Search Tree Leetcode Solution | 3010 |
446 | Sequences of given length where every element is more than or equal to twice of previous | 3007 |
447 | Priority Queue in C++ | 3002 |
448 | Search a 2D Matrix II Leetcode Solution | 3001 |
449 | Rearrange array such that even positioned are greater than odd | 2998 |
450 | Flood Fill LeetCode | 2997 |
451 | Recursion | 2994 |
452 | Move All the Zeros to the End of the Given Array | 2994 |
453 | Substring with Concatenation of All Words Leetcode Solution | 2991 |
454 | Sorting array using Stacks | 2984 |
455 | Longest Common Prefix using Sorting | 2975 |
456 | Kth Non-repeating Character | 2974 |
457 | Is Graph Bipartite? LeetCode Solution | 2966 |
458 | Find Minimum in Rotated Sorted Array II LeetCode Solution | 2964 |
459 | Postfix to Prefix Conversion | 2964 |
460 | Integer to English words | 2963 |
461 | Find a Peak Element II LeetCode Solution | 2962 |
462 | Palindrome Substring Queries | 2961 |
463 | Gold Mine Problem | 2959 |
464 | Number Complement Leetcode Solution | 2953 |
465 | Vertical Order Traversal of Binary Tree LeetCode Solution | 2952 |
466 | Path Sum II LeetCode Solution | 2950 |
467 | Distance of nearest cell having 1 in a binary matrix | 2950 |
468 | Check if Two given Strings are Isomorphic to each other | 2941 |
469 | Insert into a Binary Search Tree Leetcode Solution | 2925 |
470 | Reverse a linked list | 2919 |
471 | Number of Days Between Two Dates LeetCode Solution | 2917 |
472 | Convert Sorted Array to Binary Search Tree Leetcode Solution | 2910 |
473 | Minimum Path Sum | 2909 |
474 | How to Implement Stack Using Priority Queue or Heap? | 2907 |
475 | Majority Element | 2907 |
476 | Find All Possible Recipes from Given Supplies LeetCode Solution | 2906 |
477 | Queries for GCD of all numbers of an array except elements in a given range | 2906 |
478 | Best Time to Buy and Sell Stock | 2900 |
479 | 4Sum | 2896 |
480 | 3 Sum | 2894 |
481 | Cells with Odd Values in a Matrix LeetCode Solution | 2890 |
482 | Shortest Completing Word Leetcode Solution | 2890 |
483 | Multiplication of Two Matrices | 2885 |
484 | Balanced Expression with Replacement | 2882 |
485 | Shortest Palindrome | 2877 |
486 | Find Pythagorean Triplets from Array | 2877 |
487 | Count Submatrices With All Ones LeetCode Solution | 2873 |
488 | Find a Fixed Point in a Given Array | 2873 |
489 | Tiling Problem | 2871 |
490 | Trapping Rain Water LeetCode Solution | 2871 |
491 | Intersection of Two Linked Lists LeetCode Solution | 2869 |
492 | Longest Increasing Path in a Matrix LeetCode Solution | 2868 |
493 | Scramble String LeetCode Solution | 2865 |
494 | Minimum Number of Taps to Open to Water a Garden LeetCode Solution | 2862 |
495 | High Five LeetCode Solution | 2857 |
496 | Design Hit Counter LeetCode Solution | 2857 |
497 | Rearrange an array in order – smallest, largest, 2nd smallest, 2nd largest | 2853 |
498 | The Stock Span Problem | 2853 |
499 | Check If Array Pairs Are Divisible by k LeetCode Solution | 2850 |
500 | Kth ancestor of a node in binary tree | 2846 |
501 | Sliding Window Maximum LeetCode Solution | 2844 |
502 | Find Median from Data Stream LeetCode Solution | 2834 |
503 | Custom Sort String Leetcode Solution | 2827 |
504 | Sort Colors | 2827 |
505 | Interval Tree | 2822 |
506 | Implement Trie (Prefix Tree) Leetcode Solution | 2821 |
507 | Reorder Data in Log Files LeetCode Solution | 2820 |
508 | Largest rectangular sub-matrix whose sum is 0 | 2819 |
509 | Spiral Matrix III LeetCode Solution | 2815 |
510 | Camelcase Matching Leetcode Solution | 2814 |
511 | Find the first Repeating Number in a Given Array | 2805 |
512 | Insert Node in the Sorted Linked List | 2804 |
513 | Sliding Window Median Leetcode Solution | 2801 |
514 | Generate all Binary Strings from Given Pattern | 2800 |
515 | Detect a loop in the Linked List | 2796 |
516 | Sieve of Eratosthenes | 2788 |
517 | Evaluate Reverse Polish Notation LeetCode Solution | 2786 |
518 | Sort an array according to the order defined by another array | 2785 |
519 | Pancake Sorting Problem | 2781 |
520 | Divide Chocolate LeetCode Solution | 2779 |
521 | Merge Two Binary Trees LeetCode Solution | 2779 |
522 | Count subarrays having total distinct elements same as original array | 2766 |
523 | Letter Case Permutation | 2751 |
524 | Analyze User Website Visit Pattern LeetCode Solution | 2748 |
525 | Perfect Squares LeetCode Solution | 2747 |
526 | Check if Array Contains Contiguous Integers With Duplicates Allowed | 2747 |
527 | How to Create Mergable Stack? | 2747 |
528 | Fibonacci Number LeetCode Solution | 2741 |
529 | Coin Change Problem | 2739 |
530 | Different Ways to Add Parentheses Leetcode Solution | 2737 |
531 | Print all Palindromic Partitions of a String | 2736 |
532 | Fibonacci numbers | 2735 |
533 | Longest Common Prefix using Divide and Conquer | 2735 |
534 | Minimum Bracket Reversals | 2733 |
535 | Guess Number Higher or Lower II | 2731 |
536 | Best Time to Buy and Sell Stock with Transaction Fee Leetcode Solution | 2730 |
537 | Determine Whether Matrix Can Be Obtained By Rotation LeetCode Solution | 2728 |
538 | N queen problem | 2726 |
539 | Maximum Sum of Non Consecutive Elements | 2726 |
540 | Count Possible Triangles | 2721 |
541 | Palindrome Permutation LeetCode Solution | 2720 |
542 | Race Car LeetCode Solution | 2718 |
543 | Minimum Height Trees | 2708 |
544 | LCS (Longest Common Subsequence) of three strings | 2705 |
545 | Merge Overlapping Intervals | 2705 |
546 | The Maze III LeetCode Solution | 2702 |
547 | Largest Subarray with Equal Number of 0’s and 1’s | 2700 |
548 | Number of Distinct Islands Leetcode Solution | 2697 |
549 | Subset sum problem | 2696 |
550 | Decode String | 2691 |
551 | Path Crossing Leetcode Solution | 2680 |
552 | Count items common to both the lists but with different prices | 2679 |
553 | Group Anagrams | 2675 |
554 | Longest Substring with At Least K Repeating Characters LeetCode Solution | 2674 |
555 | Maximum Number of Ways to Partition an Array LeetCode Solution | 2672 |
556 | Find maximum length Snake sequence | 2665 |
557 | Maximum Element in an Array which is Increasing and then Decreasing | 2664 |
558 | Find a Sorted Subsequence of size 3 | 2661 |
559 | Maximum Length of Chain Pairs | 2658 |
560 | Recover Binary Search Tree Leetcode Solution | 2655 |
561 | Longest Repeated Subsequence | 2655 |
562 | Find the Minimum Element in a Sorted and Rotated Array | 2655 |
563 | Queue based approach for first non-repeating character in a stream | 2654 |
564 | Shifting Letters LeetCode Solution | 2650 |
565 | Champagne Tower LeetCode Solution | 2645 |
566 | First missing positive | 2645 |
567 | Build an Array With Stack Operations Leetcode Solution | 2644 |
568 | Convert BST to Min Heap | 2638 |
569 | Find the two Numbers with Odd Occurrences in an Unsorted Array | 2631 |
570 | Minimum Jumps to Reach Home LeetCode Solution | 2629 |
571 | Find if an Expression has Duplicate Parenthesis or Not | 2627 |
572 | Minimum Height Trees LeetCode Solution | 2625 |
573 | Sort a stack using recursion | 2621 |
574 | Nearest Exit from Entrance in Maze LeetCode Solution | 2620 |
575 | Iterative Method to find Height of Binary Tree | 2615 |
576 | Decode Ways | 2615 |
577 | Make Two Arrays Equal by Reversing Sub-arrays Leetcode Solution | 2614 |
578 | Find the Lost Element From a Duplicated Array | 2614 |
579 | Number of Equivalent Domino Pairs Leetcode Solution | 2612 |
580 | Edit Distance LeetCode Solution | 2609 |
581 | Valid Boomerang Leetcode Solution | 2609 |
582 | Palindrome Partitioning Leetcode Solution | 2607 |
583 | K-th Distinct Element in an Array | 2607 |
584 | Sliding Window Maximum | 2605 |
585 | Implement Two Stacks in an Array | 2604 |
586 | Jump Game IV LeetCode Solution | 2602 |
587 | Rectangle Overlap LeetCode Solution | 2601 |
588 | Contains Duplicate | 2600 |
589 | Contiguous Array LeetCode Solution | 2599 |
590 | Most Stones Removed with Same Row or Column LeetCode Solution | 2575 |
591 | Subarrays with K Different Integers Leetcode Solution | 2573 |
592 | Queue using Stacks | 2569 |
593 | Reorder an Array According to the Given Indexes | 2564 |
594 | Distance Between Bus Stops Leetcode Solution | 2562 |
595 | Morris Traversal | 2562 |
596 | Monotonic Array Leetcode Solution | 2552 |
597 | Recover Binary Search Tree | 2550 |
598 | Design a Stack With Increment Operation Leetcode Solution | 2544 |
599 | Minimum number of jumps to reach end | 2542 |
600 | Find the Town Judge LeetCode Solution | 2537 |
601 | Word Break | 2535 |
602 | Construction of Longest Increasing Subsequence (N log N) | 2532 |
603 | Palindrome Permutations of a String | 2529 |
604 | Sort a String According to Another String | 2528 |
605 | Number of Subsequences That Satisfy the Given Sum Condition LeetCode solution | 2525 |
606 | Rearrange Spaces Between Words Leetcode Solution | 2525 |
607 | Maximum Depth of N-ary Tree Leetcode Solution | 2520 |
608 | Sorted Linked List to Balanced BST | 2519 |
609 | Palindromic Substrings Leetcode Solution | 2507 |
610 | Possible Bipartition LeetCode Solution | 2504 |
611 | Number of palindromic paths in a matrix | 2502 |
612 | Maximum Score After Splitting a String Leetcode Solution | 2496 |
613 | Best Meeting Point LeetCode Solution | 2495 |
614 | Smallest Good Base | 2493 |
615 | Find Largest Value in Each Tree Row LeetCode Solution | 2490 |
616 | Merge Overlapping Intervals II | 2490 |
617 | Reach a Number LeetCode Solution | 2489 |
618 | Implement strStr() LeetCode Solution | 2488 |
619 | Valid Parentheses Leetcode Solution | 2483 |
620 | Merge Two Balanced Binary Search Trees | 2475 |
621 | Mean of Array After Removing Some Elements Leetcode Solution | 2473 |
622 | Maximize Elements Using Another Array | 2470 |
623 | All Possible Full Binary Trees LeetCode Solution | 2465 |
624 | Maximum sum rectangle in a 2D matrix | 2465 |
625 | Maximum Product of Splitted Binary Tree LeetCode Solution | 2461 |
626 | Check if the given array can represent Level Order Traversal of Binary Search Tree | 2460 |
627 | Binary Tree zigzag level order Traversal | 2460 |
628 | Maximum Frequency Stack Leetcode Solution | 2453 |
629 | Valid Sudoku | 2452 |
630 | Best Time to Buy and Sell Stock IV LeetCode Solution | 2449 |
631 | Find the Subarray of given length with Least Average | 2449 |
632 | Find the First Circular Tour that visits all the Petrol Pumps | 2447 |
633 | Swapping Nodes in a Linked List Leetcode Solution | 2445 |
634 | Perform String Shifts Leetcode | 2445 |
635 | Design Skiplist LeetCode Solution | 2443 |
636 | A Space Optimized DP solution for 0-1 Knapsack Problem | 2433 |
637 | Detect Capital Leetcode Solution | 2432 |
638 | Caesar Cipher | 2431 |
639 | Find Median from data Stream | 2423 |
640 | Brick Wall LeetCode Solution | 2419 |
641 | Find all pairs (a, b) in an array such that a % b = k | 2413 |
642 | Pair with given product | 2409 |
643 | Lowest Common Ancestor of a Binary Search Tree Leetcode Solution | 2408 |
644 | Word Pattern | 2406 |
645 | Count pair with Given Sum | 2405 |
646 | Merge K Sorted Arrays and Print Sorted Output | 2403 |
647 | My Calendar I LeetCode Solution | 2399 |
648 | Palindrome Permutation | 2392 |
649 | Convert Sorted List to Binary Search Tree | 2392 |
650 | Check for Balanced Parentheses in an Expression | 2391 |
651 | Find First and Last Position of Element in Sorted Array LeetCode Solution | 2383 |
652 | Binary Tree Right Side View LeetCode Solution | 2364 |
653 | Group Multiple Occurrence of Array Elements Ordered by first Occurrence | 2356 |
654 | Populating Next Right Pointers in Each Node Leetcode Solution | 2353 |
655 | Huffman Coding | 2353 |
656 | Add two numbers | 2353 |
657 | Segregate 0s and 1s in an Array | 2346 |
658 | Construct BST from given Preorder Traversal | 2346 |
659 | Split Array Into Consecutive Subsequences | 2341 |
660 | Level order Traversal in Spiral Form | 2335 |
661 | How to Efficiently Implement k Stacks in a Single Array? | 2333 |
662 | All Unique Triplets that Sum up to a Given Value | 2330 |
663 | Largest Sum Contiguous Subarray | 2329 |
664 | Length of Longest Fibonacci Subsequence | 2329 |
665 | Print Fibonacci sequence using 2 variables | 2328 |
666 | Find Zeros to be Flipped so that Number of Consecutive 1’s is Maximized | 2328 |
667 | Count ways to reach the nth stair using step 1, 2 or 3 | 2325 |
668 | Count Sub Islands LeetCode Solution | 2324 |
669 | Find whether a subarray is in form of a mountain or not | 2319 |
670 | Maximum Number of Chocolates to be Distributed Equally Among k Students | 2316 |
671 | Web Crawler LeetCode Solution | 2312 |
672 | Check if a Linked list of Strings form a Palindrome | 2312 |
673 | Minimum time required to rot all oranges | 2309 |
674 | Arithmetic Slices II – Subsequence LeetCode Solution | 2307 |
675 | Find all triplets with zero sum | 2306 |
676 | Longest Subarray Having Count of 1s One More than Count of 0s | 2301 |
677 | Counting Bits | 2301 |
678 | Print all subarrays with 0 sum | 2299 |
679 | Remove brackets from an algebraic string containing + and – operators | 2296 |
680 | Validate Binary Search Tree | 2296 |
681 | Isomorphic Strings LeetCode Solution | 2293 |
682 | Partition to K Equal Sum Subsets Leetcode Solution | 2293 |
683 | Shortest Path in a Grid with Obstacles Elimination LeetCode Solution | 2292 |
684 | Populating Next Right Pointers in Each Node | 2292 |
685 | Minimum Sum Path in a Triangle | 2289 |
686 | Sort 0s 1s and 2s in an Array | 2289 |
687 | Find four elements that sum to a given value (Hashmap) | 2285 |
688 | Minimum Swaps to Group All 1’s Together Leetcode Solution | 2276 |
689 | Rearrange Array such that arr[i] >= arr[j] if i is even and arr[i] <= arr[j] if i is odd and j < i | 2274 |
690 | Count Distinct Elements in Every Window of Size K | 2272 |
691 | Partition Problem | 2260 |
692 | Swap Kth Node from beginning with Kth Node from End | 2256 |
693 | Concatenation of Array LeetCode Solution | 2255 |
694 | Remove Palindromic Subsequences Leetcode Solution | 2251 |
695 | Heap Sort | 2249 |
696 | Bubble sort using two Stacks | 2248 |
697 | Check if String Follows Order of Characters by a Pattern or not | 2248 |
698 | Range Sum Query 2D – Immutable LeetCode Solution | 2244 |
699 | Maximize Sum of Array after K Negations Leetcode Solution | 2234 |
700 | Elements Appear more than N/K times in Array | 2228 |
701 | Happy Number | 2225 |
702 | Binary Tree to Binary Search Tree Conversion | 2221 |
703 | Finding K closest element | 2206 |
704 | Count Minimum Steps to Get the given Array | 2205 |
705 | String comparison containing wildcards | 2200 |
706 | Count Good Nodes in Binary Tree LeetCode Solution | 2198 |
707 | Difference Array | Range update query in O(1) | 2193 |
708 | Rotate Array | 2183 |
709 | Maximum Product Subarray II | 2177 |
710 | Find All Pairs With a Given Difference | 2176 |
711 | Inorder Successor of a node in Binary Tree | 2175 |
712 | Maximum Distance in Array | 2170 |
713 | Increasing Subsequence of Length three with Maximum Product | 2169 |
714 | Find Maximum of Minimum for Every Window Size in a Given Array | 2167 |
715 | Contiguous Array Leetcode | 2166 |
716 | Sum Root to Leaf Numbers LeetCode Solution | 2164 |
717 | Find Duplicate Subtrees | 2159 |
718 | Queries on Probability of Even or Odd Number in given Ranges | 2158 |
719 | Container with Most Water | 2157 |
720 | Rearrange an Array Such that arr[i] is equal to i | 2156 |
721 | Nested List Weight Sum II LeetCode Solution | 2154 |
722 | An Interesting Method to generate Binary Numbers from 1 to n | 2153 |
723 | Linked List Cycle | 2152 |
724 | Find pairs with given sum such that elements of pair are in different rows | 2152 |
725 | MiniMax Algorithm | 2146 |
726 | Merge Two Sorted Lists Leetcode | 2145 |
727 | Breadth First Search (BFS) for a Graph | 2133 |
728 | Reverse Nodes in K-Group | 2132 |
729 | Iterative Depth First Traversal of Graph | 2130 |
730 | Longest Common Prefix Using Binary Search II | 2128 |
731 | Score of Parenthesis LeetCode Solution | 2124 |
732 | Queue Reconstruction by Height | 2123 |
733 | Symmetric Tree | 2123 |
734 | Climbing stairs | 2123 |
735 | Longest Increasing Subsequence | 2122 |
736 | Reorder Array Using Given Indexes | 2120 |
737 | Parallel Courses II LeetCode Solution | 2119 |
738 | Minimum Swaps to Make Strings Equal Leetcode Solution | 2109 |
739 | Remove duplicates from sorted array | 2107 |
740 | Minimum Cost to Move Chips to The Same Position LeetCode Solution | 2106 |
741 | Substring With Concatenation Of All Words | 2105 |
742 | Alien Dictionary | 2102 |
743 | Delete Nodes and Return Forest Leetcode Solution | 2101 |
744 | Merge K Sorted Linked Lists | 2101 |
745 | Root to Leaf path with target sum Leetcode Solutions | 2099 |
746 | Iterative Preorder Traversal | 2089 |
747 | Check if Two Expressions With Brackets are Same | 2089 |
748 | Delete Nth node from the end of the given linked list | 2084 |
749 | Union and Intersection of two Linked Lists | 2082 |
750 | Construct Binary Tree from Preorder and Postorder Traversal LeetCode Solution | 2080 |
751 | Deletion in a Binary Tree | 2080 |
752 | Kill Process LeetCode Solution | 2077 |
753 | Longest Common Prefix Word by Word Matching | 2068 |
754 | Check if a queue can be sorted into another queue using a stack | 2066 |
755 | Minimum Number of Arrows to Burst Balloons LeetCode Solution | 2063 |
756 | Merging Intervals | 2062 |
757 | Smallest Range II Leetcode Solution | 2057 |
758 | K maximum sums of overlapping contiguous sub-arrays | 2057 |
759 | Minimum Distance Between BST Nodes Leetcode Solution | 2054 |
760 | Maximum size subarray sum equals k | 2054 |
761 | Check if any two intervals overlap among a given set of intervals | 2053 |
762 | Range LCM Queries | 2049 |
763 | Find the first repeating element in an array of integers | 2048 |
764 | Flatten 2D Vector LeetCode Solution | 2047 |
765 | Print a Binary Tree in Vertical Order | 2042 |
766 | Filter Restaurants by Vegan-Friendly, Price and Distance Leetcode Solution | 2041 |
767 | New 21 Game | 2039 |
768 | Non-overlapping sum of two sets | 2038 |
769 | Find subarray with given sum (Handles Negative Numbers) | 2037 |
770 | Minimum Size Subarray Sum | 2035 |
771 | Maximum difference between two elements such as larger element comes after smaller | 2029 |
772 | Find K Closest Elements LeetCode Solution | 2028 |
773 | Partition Equal Subset Sum | 2028 |
774 | Verify Preorder Serialization of a Binary Tree | 2016 |
775 | Construct Binary Tree from given Parent Array representation | 2013 |
776 | Maximum Product Subarray | 2013 |
777 | Matrix Chain Multiplication | 2009 |
778 | Sort Array by Increasing Frequency Leetcode Solution | 2008 |
779 | Find the Difference Leetcode Solution | 2008 |
780 | Vertical sum in a given binary tree | 2008 |
781 | Reservoir Sampling | 2002 |
782 | Friends Of Appropriate Ages LeetCode Solution | 2001 |
783 | Defanging an IP Address LeetCode Solution | 1999 |
784 | Boundary Traversal of binary tree | 1995 |
785 | Minimum Remove to Make Valid Parentheses LeetCode Solution | 1988 |
786 | Find Maximum Sum Possible Equal Sum of Three Stacks | 1988 |
787 | Check if a given array can represent Preorder Traversal of Binary Search Tree | 1975 |
788 | Sorting a K Sorted Array | 1974 |
789 | Flatten Binary Tree to Linked List LeetCode Solution | 1972 |
790 | The Painter’s Partition Problem | 1971 |
791 | Valid Parenthesis String | 1970 |
792 | Valid Anagrams | 1968 |
793 | Find K Length Subarray of Maximum Average | 1968 |
794 | Pancake Sorting | 1964 |
795 | Peak Index in a Mountain Array LeetCode Solution | 1962 |
796 | Find Three Element From Different Three Arrays Such That a + b + c = sum | 1959 |
797 | Boolean Parenthesization Problem | 1958 |
798 | Level order traversal using two Queues | 1953 |
799 | Find Sum of all unique sub-array sum for a given array | 1947 |
800 | Palindrome Partitioning | 1944 |
801 | Count pairs from two linked lists whose sum is equal to a given value | 1942 |
802 | BFS vs DFS for Binary Tree | 1937 |
803 | Sum of f(a[i], a[j]) over all pairs in an array of n integers | 1932 |
804 | Given a binary tree, how do you remove all the half nodes? | 1930 |
805 | Remove Duplicates from Sorted List II | 1928 |
806 | Number of siblings of a given Node in n-ary Tree | 1928 |
807 | Largest Submatrix With Rearrangements LeetCode Solution | 1927 |
808 | Check Completeness of a Binary Tree LeetCode Solution | 1923 |
809 | Check if all levels of two Binary Tree are anagrams or not | 1921 |
810 | Valid Triangle Number LeetCode Solution | 1918 |
811 | Count number of triplets with product equal to given number | 1918 |
812 | Super Ugly Number | 1918 |
813 | Employee Importance LeetCode Solution | 1916 |
814 | Third Maximum Number Leetcode Solution | 1911 |
815 | Hamming Distance | 1905 |
816 | Unique Binary Search Trees LeetCode Solution | 1902 |
817 | Isomorphic Strings | 1902 |
818 | Kth Smallest Element in a Sorted Matrix LeetCode Solution | 1901 |
819 | Number Of Longest Increasing Subsequence | 1901 |
820 | Tree Traversal (Preorder, Inorder & Postorder) | 1899 |
821 | Longest Palindromic Subsequence | 1898 |
822 | Lowest Common Ancestor | 1897 |
823 | Print All Distinct Elements of a Given Integer Array | 1894 |
824 | Level of Each node in a Tree from source node | 1891 |
825 | Create Maximum Number | 1890 |
826 | Count and Say | 1888 |
827 | Balanced Binary Tree | 1886 |
828 | Largest divisible pairs subset | 1885 |
829 | Products of ranges in an array | 1885 |
830 | Find Peak Element | 1885 |
831 | Find Element Using Binary Search in Sorted Array | 1885 |
832 | Unique Binary Search Trees | 1882 |
833 | Array Nesting Leetcode Solution | 1880 |
834 | Find distance between two nodes of a Binary Tree | 1880 |
835 | Largest BST Subtree LeetCode Solution | 1878 |
836 | Print all triplets in sorted array that form AP | 1878 |
837 | Closest Leaf in a Binary Tree LeetCode Solution | 1877 |
838 | Maximum subsequence sum such that no three are consecutive | 1877 |
839 | Find the largest multiple of 3 | 1872 |
840 | Median of Two Sorted Arrays | 1872 |
841 | Find Common Characters Leetcode Solution | 1870 |
842 | Check if two nodes are on the same path in a Tree | 1864 |
843 | Distinct Subsequences | 1862 |
844 | Minimum insertions to form a palindrome with permutations allowed | 1861 |
845 | Bold Words in String LeetCode Solution | 1852 |
846 | Arrange given numbers to form the biggest number | 1852 |
847 | Maximum number of segments of lengths a, b and c | 1849 |
848 | Topological Sorting | 1849 |
849 | Find Smallest Range Containing Elements from k Lists | 1848 |
850 | Newman-Conway Sequence | 1847 |
851 | Infix to Postfix | 1847 |
852 | Binary array after M range toggle operations | 1843 |
853 | Subset Sum Problem in O(sum) space | 1842 |
854 | Valid Number | 1833 |
855 | Four Elements that Sum to Given | 1832 |
856 | Merging Two Sorted Arrays | 1830 |
857 | Find Nth Node | 1827 |
858 | Compare Strings by Frequency of the Smallest Character Leetcode Solution | 1825 |
859 | Shuffle an Array | 1825 |
860 | Next Greater Element in an Array | 1820 |
861 | Maximum Population Year LeetCode Solution | 1818 |
862 | Sort Elements by Frequency II | 1817 |
863 | Lower Case To Upper Case | 1811 |
864 | First Bad Version | 1804 |
865 | Transform a BST to Greater sum Tree | 1803 |
866 | Missing Number | 1801 |
867 | Path Sum | 1796 |
868 | Insert Delete GetRandom | 1795 |
869 | Contiguous Array | 1793 |
870 | Stone Game IV LeetCode Solution | 1789 |
871 | Maximum Sum of 3 Non-Overlapping Subarrays | 1788 |
872 | Sentence Screen Fitting LeetCode Solution | 1785 |
873 | Largest subarray with equal number of 0s and 1s | 1785 |
874 | Averages of Levels in Binary Tree | 1784 |
875 | Binary Tree Longest Consecutive Sequence LeetCode Solution | 1781 |
876 | Encoded String With Shortest Length LeetCode Solution | 1780 |
877 | Bottom View of a Binary Tree | 1778 |
878 | Stone Game IV LeetCode Solution | 1777 |
879 | Print Right View of a Binary Tree | 1775 |
880 | Merge Two Sorted Arrays | 1774 |
881 | Valid Triangle Number LeetCode Solution | 1773 |
882 | Count Primes in Ranges | 1770 |
883 | Maximum Side Length of a Square with Sum Less than or Equal to Threshold LeetCode Solution | 1769 |
884 | Find Largest d in Array such that a + b + c = d | 1769 |
885 | Minimum sum of squares of character counts in a given string after removing k characters | 1766 |
886 | Trapping Rain Water II LeetCode Solution | 1765 |
887 | Height of a generic tree from parent array | 1765 |
888 | Red-Black Tree Introduction | 1760 |
889 | Minimum Swaps To Make Sequences Increasing LeetCode Solution | 1758 |
890 | Closest Binary Search Tree Value Leetcode Solution | 1756 |
891 | Kth Smallest Number in Multiplication Table Leetcode Solution | 1755 |
892 | Iterative Postorder Traversal Using Two Stacks | 1748 |
893 | Integer to Roman | 1747 |
894 | Permutations of a Given String Using STL | 1746 |
895 | Longest Bitonic Subsequence | 1743 |
896 | Find unique character in a string | 1743 |
897 | Range Minimum Query (Square Root Decomposition and Sparse Table) | 1738 |
898 | Next Greater Element II LeetCode Solution | 1736 |
899 | Valid Perfect Square LeetCode Solution | 1734 |
900 | Friends Pairing Problem | 1732 |
901 | Serialize and Deserialize Binary Tree LeetCode Solution | 1731 |
902 | Rearrange an array such that ‘arr[j]’ becomes ‘i’ if ‘arr[i]’ is ‘j’ | 1724 |
903 | Segment Tree | 1724 |
904 | Diagonal Traversal of Binary Tree | 1718 |
905 | Reorganize String | 1714 |
906 | Diameter of N-Ary Tree LeetCode Solution | 1712 |
907 | Range Sum Query using Sparse Table | 1707 |
908 | Binary Search Tree Delete Operation | 1707 |
909 | Orderly Queue LeetCode Solution | 1702 |
910 | Next greater element | 1697 |
911 | Step-By-Step Directions From a Binary Tree Node to Another LeetCode Solution | 1692 |
912 | Maximum difference between frequency of two elements such that element having greater frequency is also greater | 1692 |
913 | Swap Nodes In Pairs | 1692 |
914 | Level Order Traversal of Binary Tree | 1678 |
915 | Serialize and Deserialize Binary Tree | 1675 |
916 | Koko Eating Bananas LeetCode Solution | 1673 |
917 | Constant time range add operation on an array | 1672 |
918 | Find Minimum In Rotated Sorted Array | 1672 |
919 | Reverse a Path in BST using Queue | 1664 |
920 | Valid Tic-Tac-Toe State LeetCode Solution | 1661 |
921 | Maximum difference between first and last indexes of an element in array | 1658 |
922 | Best Meeting Point LeetCode Solution | 1655 |
923 | Total Hamming Distance LeetCode Solution | 1653 |
924 | Maximum Product Subarray | 1653 |
925 | Largest Plus Sign Leetcode Solution | 1647 |
926 | Advantages of BST over Hash Table | 1647 |
927 | Find the smallest binary digit multiple of given number | 1644 |
928 | Convert BST into a Min-Heap without using array | 1644 |
929 | The Number of Weak Characters in the Game LeetCode Solution | 1637 |
930 | Maximum Product Subarray | 1636 |
931 | Find minimum number of merge operations to make an array palindrome | 1636 |
932 | Array Queries for multiply replacements and product | 1622 |
933 | Maximum Sum Increasing Subsequence | 1622 |
934 | Longest Increasing Consecutive Subsequence | 1620 |
935 | Edit Distance | 1618 |
936 | A program to check if a binary tree is BST or not | 1611 |
937 | Count the Pairs at Same Distance as in English Alphabets | 1611 |
938 | Greatest Sum Divisible by Three LeetCode Solution | 1607 |
939 | Design Add and Search Words Data Structure LeetCode Solution | 1606 |
940 | Collect maximum points in a grid using two traversals | 1606 |
941 | Image Overlap LeetCode Solution | 1604 |
942 | Shuffle a given Array | 1604 |
943 | Print n terms of Newman-Conway Sequence | 1603 |
944 | Find the node with minimum value in a Binary Search Tree | 1601 |
945 | Write Code to Determine if Two Trees are Identical | 1598 |
946 | K’th Largest element in BST using constant extra space | 1595 |
947 | Dividing Array into Pairs With Sum Divisible by K | 1595 |
948 | Range Queries for Longest Correct Bracket Subsequence | 1592 |
949 | Group Shifted Strings Leetcode Solution | 1591 |
950 | Design Underground System Leetcode Solution | 1589 |
951 | Longest Substring Without Repeating Characters Leetcode Solution | 1586 |
952 | Factorial Trailing Zeroes LeetCode Solution | 1585 |
953 | Write a function to get the intersection point of two Linked Lists | 1583 |
954 | Check if an Array is Stack Sortable | 1582 |
955 | Print Next Greater Number of Q queries | 1580 |
956 | Moving Stones Until Consecutive Leetcode Solution | 1575 |
957 | Queries on XOR of greatest odd divisor of the range | 1573 |
958 | Merge Sort | 1572 |
959 | Insert into a Sorted Circular Linked List LeetCode Solution | 1563 |
960 | Clone a Binary Tree with Random Pointers | 1558 |
961 | Power of Two | 1554 |
962 | Binary Search Tree Search and Insertion | 1552 |
963 | K’th Largest Element in BST when modification to BST is not allowed | 1551 |
964 | Print modified array after multiple array range increment operations | 1550 |
965 | Lowest Common Ancestor in Binary Search Tree | 1547 |
966 | Swim in Rising Water LeetCode Solution | 1546 |
967 | Form Minimum Number From Given Sequence | 1544 |
968 | Numbers with prime frequencies greater than or equal to k | 1539 |
969 | Maximum Array from Two given Arrays Keeping Order Same | 1535 |
970 | Form minimum number from given sequence | 1528 |
971 | Guess The Word | 1524 |
972 | Priority Queue | 1516 |
973 | Closest Binary Search Tree Value II LeetCode Solution | 1515 |
974 | Count even length binary sequences with same sum of first and second half bits | 1514 |
975 | Check for Palindrome after every character replacement Query | 1513 |
976 | Cutting a Rod | 1510 |
977 | Check if X can give change to every person in the Queue | 1506 |
978 | Merge Sorted Array | 1505 |
979 | Check if each internal node of a BST has exactly one child | 1496 |
980 | Find maximum average subarray of k length | 1496 |
981 | Excel Sheet Column Number LeetCode Solution | 1495 |
982 | K Empty Slots | 1489 |
983 | Longest Common Prefix using Character by Character Matching | 1489 |
984 | Print all Possible Ways to Break a String in Bracket Form | 1488 |
985 | Construct Complete Binary Tree from its Linked List Representation | 1484 |
986 | Count and Toggle Queries on a Binary Array | 1474 |
987 | Queries for Decimal Values of Subarrays of a Binary Array | 1474 |
988 | Minimum Possible Integer After at Most K Adjacent Swaps On Digits LeetCode Solution | 1473 |
989 | Number of elements less than or equal to a given number in a given subarray | 1471 |
990 | Count Pairs Whose Products Exist in Array | 1465 |
991 | Minimum Moves to Equal Array Elements LeetCode Solution | 1461 |
992 | Queries for Number of Distinct Elements in a Subarray | 1461 |
993 | Sorted Array to Balanced BST | 1460 |
994 | Insert Delete GetRandom O(1) – Duplicates allowed LeetCode Solution | 1452 |
995 | Number of Orders in the Backlog Leetcode Solution | 1452 |
996 | Merge two BSTs with limited extra space | 1451 |
997 | Kth Smallest Element in a BST | 1450 |
998 | Find postorder traversal of BST from preorder traversal | 1449 |
999 | Print Ancestors of a Given Binary Tree Node Without Recursion | 1447 |
1000 | Binary Search Tree | 1446 |
1001 | Sum of Left Leaves LeetCode Solution | 1441 |
1002 | Decrease Elements To Make Array Zigzag LeetCode Solution | 1439 |
1003 | Unique Paths II | 1438 |
1004 | Search in Sorted Rotated Array | 1438 |
1005 | Regular Expression Matching | 1426 |
1006 | How to print maximum number of A’s using given four keys | 1425 |
1007 | Graph Cloning | 1423 |
1008 | Palindrome Partitioning | 1423 |
1009 | Excel Sheet Column Title LeetCode Solution | 1415 |
1010 | Check given array of size n can represent BST of n levels or not | 1404 |
1011 | Maximum weight transformation of a given string | 1401 |
1012 | Find Maximum Depth of Nested Parenthesis in a String | 1397 |
1013 | Shortest Unsorted Continuous Subarray LeetCode Solution | 1396 |
1014 | Symmetric Tree LeetCode Solution Leetcode Solution | 1389 |
1015 | Kth Smallest Product of Two Sorted Arrays LeetCode Solution | 1374 |
1016 | Random Pick Index LeetCode Solution | 1371 |
1017 | Maximum Depth Of Binary Tree | 1367 |
1018 | Data Structure Designing | 1365 |
1019 | Convert a BST to a Binary Tree such that sum of all greater keys is added to every key | 1341 |
1020 | Iterative method to find ancestors of a given binary tree | 1339 |
1021 | Search an Element in Sorted Rotated Array | 1331 |
1022 | Minimum Number of Operations to Move All Balls to Each Box LeetCode Solution | 1328 |
1023 | Find the Town Judge LeetCode Solution | 1309 |
1024 | Binary Tree to Binary Search Tree Conversion using STL set | 1284 |
1025 | Next Greater Element I Leetcode Solution | 1255 |
1026 | Maximum Binary Tree | 1246 |
1027 | Print Maximum Length Chain of Pairs | 1213 |
1028 | Find k-th smallest element in BST (Order Statistics in BST) | 1209 |
1029 | Peeking Iterator LeetCode Solution | 1190 |
1030 | Find Two Non-overlapping Sub-arrays Each With Target Sum LeetCode Solution | 1186 |
1031 | Flatten Binary Tree to Linked List LeetCode Solution | 1179 |