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 | 41558 |
2 | Maximum occurring character in a string | 19178 |
3 | Plus One Leetcode Solution | 18436 |
4 | Valid Parentheses LeetCode Solution | 18251 |
5 | 3Sum Leetcode Solution | 16180 |
6 | First Repeating Element | 14634 |
7 | Single Number Leetcode Solution | 14298 |
8 | Merge Sorted Arrays Leetcode Solution | 14016 |
9 | Count Primes Leetcode Solutions | 13836 |
10 | Pow(x, n) Leetcode Solution | 13516 |
11 | Sqrt(x) Leetcode Solution | 13317 |
12 | Meeting Rooms II LeetCode Solution | 12463 |
13 | Concatenation of Array LeetCode Solution | 12208 |
14 | Roman to Integer Leetcode Solution | 11429 |
15 | Search Insert Position Leetcode Solution | 11226 |
16 | Contains Duplicate II Leetcode Solution | 11216 |
17 | Valid Palindrome Leetcode Solution | 11146 |
18 | Palindrome Number LeetCode Solution | 11086 |
19 | Reverse Vowels of a String Leetcode Solution | 10662 |
20 | Jump Game Leetcode Solution | 10544 |
21 | Intersection of Two Arrays II Leetcode Solution | 10521 |
22 | Number of Good Pairs Leetcode Solution | 10445 |
23 | Spiral Matrix LeetCode Solution | 10300 |
24 | Kids With the Greatest Number of Candies Leetcode Solution | 10256 |
25 | Longest Substring Without Repeating Characters LeetCode Solution | 10236 |
26 | House Robber Leetcode Solution | 10206 |
27 | Remove Duplicates from Sorted Array Leetcode Solution | 10157 |
28 | Add Binary Leetcode Solution | 10060 |
29 | Maximum Subarray Leetcode Solution | 9711 |
30 | Find the Maximum Repeating Number in Array | 9642 |
31 | Text Justification LeetCode Solution | 9463 |
32 | Number Of 1 bits | 9371 |
33 | Jewels and Stones Leetcode Solution | 9257 |
34 | Longest Palindromic Substring LeetCode Solution | 9160 |
35 | Power of Two Leetcode Solution | 9109 |
36 | Min Stack Leetcode Solution | 9063 |
37 | Move Zeroes LeetCode Solution | 9057 |
38 | Permutations Leetcode Solution | 8982 |
39 | Shuffle String Leetcode Solution | 8855 |
40 | Find All Numbers Disappeared in an Array Leetcode Solution | 8776 |
41 | Third Maximum Number Leetcode Solution | 8705 |
42 | Word Search Leetcode Solution | 8694 |
43 | Next Permutation Leetcode Solution | 8692 |
44 | Daily Temperatures Leetcode Solution | 8686 |
45 | Number of Islands LeetCode Solution | 8602 |
46 | Median of Two Sorted Arrays LeetCode Solution | 8598 |
47 | Maximum Profit in Job Scheduling Leetcode Solution | 8530 |
48 | Kth Missing Positive Number Leetcode Solution | 8511 |
49 | Longest Common Prefix Leetcode Solution | 8498 |
50 | Search in Rotated Sorted Array Leetcode Solution | 8492 |
51 | Next Greater Element I Leetcode Solution | 8421 |
52 | Frog Jump Leetcode Solution | 8358 |
53 | Find Minimum Distance Between Two Numbers in an Array | 8215 |
54 | Evaluation of Postfix Expression | 8167 |
55 | Running Sum of 1d Array Leetcode Solution | 8148 |
56 | Rotate Image LeetCode Solution | 8072 |
57 | Multiply Strings Leetcode Solution | 8068 |
58 | Can Place Flowers LeetCode Solution | 7994 |
59 | Shuffle the Array Leetcode Solution | 7988 |
60 | Valid Anagram Leetcode Solution | 7986 |
61 | Combination Sum Leetcode Solution | 7972 |
62 | Bulb Switcher LeetCode Solution | 7968 |
63 | 3Sum Closest LeetCode Solution | 7949 |
64 | House Robber II Leetcode Solution | 7925 |
65 | Count and Say Leetcode Solution | 7877 |
66 | Subarray and Subsequence | 7651 |
67 | Koko Eating Bananas Leetcode Solution | 7628 |
68 | Excel Sheet Column Title Leetcode Solution | 7614 |
69 | Isomorphic Strings Leetcode Solution | 7578 |
70 | Missing Number Leetcode Solution | 7553 |
71 | Happy Number Leetcode Solution | 7536 |
72 | Count Pairs With Given Sum | 7522 |
73 | Product of array except self | 7519 |
74 | Integer to Roman Leetcode Solution | 7515 |
75 | Strobogrammatic Number LeetCode Solution | 7470 |
76 | Majority Element Leetcode Solution | 7455 |
77 | Reverse String Without Temporary Variable | 7445 |
78 | Rotate String LeetCode Solution | 7353 |
79 | Best Time to Buy and Sell Stock LeetCode Solution | 7347 |
80 | Candy LeetCode Solution | 7304 |
81 | Find the Difference Leetcode Solution | 7249 |
82 | Is Subsequence Leetcode Solution | 7229 |
83 | Largest Number Leetcode Solution | 7168 |
84 | Subtract the Product and Sum of Digits of an Integer Leetcode Solution | 7125 |
85 | Find Common Characters Leetcode Solution | 7110 |
86 | String to Integer (atoi) LeetCode Solution | 7081 |
87 | How Many Numbers Are Smaller Than the Current Number Leetcode Solution | 7066 |
88 | Set Matrix Zeroes | 6999 |
89 | Find the Duplicate Number LeetCode Solution | 6982 |
90 | Binary Search LeetCode Solution | 6951 |
91 | Summary Ranges Leetcode Solution | 6918 |
92 | A Product Array Puzzle | 6918 |
93 | Subset Leetcode | 6885 |
94 | Expression Evaluation | 6877 |
95 | Sort Characters By Frequency LeetCode Solution | 6836 |
96 | Word Pattern LeetCode Solution | 6800 |
97 | Balanced Binary Tree Leetcode Solution | 6799 |
98 | Find the Town Judge Leetcode Solution | 6789 |
99 | Rabin Karp Algorithm | 6764 |
100 | Unique Paths Leetcode Solution | 6755 |
101 | Arranging Coins Leetcode Solution | 6727 |
102 | Find the Winner of the Circular Game LeetCode Solution | 6658 |
103 | Rearrange Positive and Negative Numbers Alternatively in Array | 6642 |
104 | String Compression LeetCode Solution | 6620 |
105 | Repeated Substring Pattern LeetCode Solution | 6600 |
106 | Smallest window in a string containing all characters of another string | 6581 |
107 | Asteroid Collision LeetCode Solution | 6573 |
108 | Sort Colors LeetCode Solution | 6506 |
109 | Group Anagrams LeetCode Solution | 6464 |
110 | Best Time to Buy and Sell Stock II Leetcode Solution | 6358 |
111 | Sort Array By Parity LeetCode Solution | 6336 |
112 | Zigzag Conversion LeetCode Solution | 6326 |
113 | Page Replacement Algorithms in Operating Systems | 6308 |
114 | Sum of minimum and maximum elements of all subarrays of size k | 6277 |
115 | Postfix to Infix Conversion | 6259 |
116 | Valid Palindrome II Leetcode Solution | 6241 |
117 | Divide Two Integers Leetcode Solution | 6235 |
118 | Reverse Integer Leetcode Solution | 6172 |
119 | Product of Array Except Self LeetCode Solution | 6161 |
120 | Generate Parentheses Leetcode Solution | 6155 |
121 | Kth largest element in an Array Leetcode Solutions | 6144 |
122 | Assign Cookies Leetcode Solution | 6112 |
123 | Matrix Chain Multiplication using Dynamic Programming | 6079 |
124 | Merge Two Sorted Lists Leetcode Solutions | 6049 |
125 | Bus Routes Leetcode Solution | 6044 |
126 | Pascal Triangle Leetcode | 6044 |
127 | Number of Provinces Leetcode Solution | 6028 |
128 | Remove Duplicates from Sorted Array II Leetcode Solution | 6026 |
129 | Linked List Cycle II LeetCode Solution | 6008 |
130 | Length of Last Word Leetcode Solution | 5991 |
131 | H-Index Leetcode Solution | 5976 |
132 | Decode String Leetcode Solution | 5960 |
133 | Minimum Steps to reach target by a Knight | 5928 |
134 | Convert array into Zig-Zag fashion | 5918 |
135 | Defanging an IP Address Leetcode Solution | 5904 |
136 | Optimal Account Balancing LeetCode Solution | 5903 |
137 | Employee Free Time LeetCode Solution | 5900 |
138 | First element occurring k times in an array | 5834 |
139 | Minimum Cost For Tickets Leetcode Solution | 5832 |
140 | Build Array From Permutation Leetcode Solution | 5788 |
141 | Pascal’s Triangle II Leetcode Solution | 5734 |
142 | Prefix to Infix Conversion | 5703 |
143 | Increasing Triplet Subsequence LeetCode Solution | 5699 |
144 | Implementation of Deque using Doubly Linked List | 5658 |
145 | Find First and Last Position of Element in Sorted Array Leetcode Solution | 5651 |
146 | Find the Row with Maximum Number of 1’s | 5627 |
147 | Robot Room Cleaner Leetcode Solution | 5620 |
148 | Island Perimeter Leetcode Solution | 5616 |
149 | Max Consecutive Ones Leetcode Solution | 5556 |
150 | Find Pair with Given Difference | 5548 |
151 | Bellman Ford Algorithm | 5546 |
152 | Swap Nodes in Pairs Leetcode Solutions | 5544 |
153 | K-th Smallest Element in a Sorted Matrix | 5541 |
154 | Majority Element II Leetcode Solution | 5531 |
155 | Fibonacci Number LeetCode Solution | 5529 |
156 | Check if the Elements of an Array are Consecutive | 5502 |
157 | Design Parking System Leetcode Solution | 5461 |
158 | Guess Number Higher or Lower LeetCode Solution | 5460 |
159 | KMP Algorithm | 5457 |
160 | Find the Missing Number | 5456 |
161 | Merge Sorted Array LeetCode Solution | 5435 |
162 | Lemonade Change Leetcode Solution | 5411 |
163 | First negative integer in every window of size k | 5408 |
164 | Length of the largest subarray with contiguous elements | 5404 |
165 | Add Two Numbers II Leetcode Solution | 5397 |
166 | Delete middle element of a stack | 5395 |
167 | Coin Change 2 Leetcode Solution | 5385 |
168 | First Unique Character in a String LeetCode Solution | 5381 |
169 | Subarray Product Less Than K LeetCode Solution | 5373 |
170 | OSI Model | 5363 |
171 | Last Stone Weight | 5341 |
172 | String Compression | 5333 |
173 | Subarray Sum Equals K LeetCode Solution | 5324 |
174 | Capacity To Ship Packages Within D Days Leetcode Solution | 5323 |
175 | Subarray with Given Sum | 5305 |
176 | Word Ladder LeetCode Solution | 5301 |
177 | Find Smallest Missing Number in a Sorted Array | 5278 |
178 | Find All Duplicates in an Array LeetCode Solution | 5274 |
179 | Palindrome Linked List Leetcode Solution | 5270 |
180 | Form Minimum Number from Given Sequence of D’s and I’s | 5269 |
181 | Set Matrix Zeroes Leetcode Solution | 5263 |
182 | Monotonic Array LeetCode Solution | 5246 |
183 | Trapping Rain Water Leetcode Solution | 5244 |
184 | Repeated Substring Pattern | 5221 |
185 | Combinations Leetcode Solution | 5201 |
186 | Reverse Words in a String III LeetCode Solution | 5181 |
187 | Remove Duplicates from Sorted List II LeetCode Solution | 5175 |
188 | Same Tree LeetCode Solution | 5166 |
189 | Iterative Implementation of Quick Sort | 5150 |
190 | Valid Perfect Square Leetcode Solution | 5133 |
191 | Continuous Subarray Sum LeetCode Solution | 5121 |
192 | 01 Matrix LeetCode Solution | 5114 |
193 | Single Element in a Sorted Array LeetCode Solution | 5082 |
194 | Remove Linked List Elements Leetcode Solution | 5073 |
195 | Backspace String Compare | 5065 |
196 | Break a Palindrome LeetCode Solution | 5061 |
197 | Merge k Sorted Lists Leetcode Solution | 5028 |
198 | Slowest Key Leetcode Solution | 5023 |
199 | Prefix to Postfix Conversion | 5009 |
200 | Combination Sum | 4997 |
201 | Relative Ranks Leetcode Solution | 4986 |
202 | The K Weakest Rows in a Matrix Leetcode Solution | 4958 |
203 | Leetcode Permutations | 4955 |
204 | Find the Duplicate Element | 4929 |
205 | Rotate List Leetcode Solution | 4903 |
206 | Second Most Repeated Word in a Sequence | 4886 |
207 | Printing brackets in Matrix Chain Multiplication Problem | 4879 |
208 | Maximum Product of Three Numbers LeetCode Solution | 4869 |
209 | Find Peak Element LeetCode Solution | 4864 |
210 | Insert Delete GetRandom O(1) Leetcode Solution | 4859 |
211 | Kth Largest Element in a Stream Leetcode Solution | 4837 |
212 | Longest Common Subsequence LeetCode Solution | 4832 |
213 | Top K Frequent Elements LeetCode Solution | 4814 |
214 | Palindrome Number | 4811 |
215 | Remove All Occurrences of a Substring LeetCode Solution | 4800 |
216 | Convert a Number to Hexadecimal Leetcode Solution | 4791 |
217 | Rearrange given Array in Maximum Minimum Form | 4790 |
218 | Make The String Great Leetcode Solution | 4782 |
219 | Cuckoo sequence program | 4770 |
220 | Relative Sort Array Leetcode Solution | 4759 |
221 | Subarray Sum Equals k | 4756 |
222 | Delete Node in a Linked List Leetcode Solution | 4745 |
223 | Unique Paths II Leetcode Solution | 4739 |
224 | Max Area of Island | 4738 |
225 | Find Leaders in an Array | 4729 |
226 | Target Sum | 4715 |
227 | Generate all Binary Strings Without Consecutive 1’s | 4704 |
228 | Time Based Key-Value Store LeetCode Solution | 4700 |
229 | Permutation in String Leetcode Solution | 4700 |
230 | Check If Two String Arrays are Equivalent Leetcode Solution | 4692 |
231 | Container With Most Water LeetCode Solution | 4690 |
232 | Moving Average from Data Stream Leetcode Solution | 4678 |
233 | N-Queens LeetCode Solution | 4664 |
234 | Find N Unique Integers Sum up to Zero Leetcode Solution | 4660 |
235 | Given two unsorted arrays find all pairs whose sum is x | 4644 |
236 | Count Good Nodes in Binary Tree Leetcode Solution | 4635 |
237 | Scramble String | 4626 |
238 | Arithmetic Expression Evaluation | 4610 |
239 | Contains Duplicate LeetCode Solution | 4601 |
240 | Number of Dice Rolls With Target Sum LeetCode Solution | 4595 |
241 | LRU Cache LeetCode Solution | 4577 |
242 | Letter Combinations of a Phone Number | 4571 |
243 | Find Triplet in Array With a Given Sum | 4562 |
244 | Construct Binary Tree from Given Inorder and Preorder Traversals | 4542 |
245 | Minimum swaps required to bring all elements less than or equal to k together | 4539 |
246 | Flipping an Image LeetCode Solution | 4535 |
247 | Stone Game LeetCode | 4533 |
248 | Remove Minimum Characters so that Two Strings Become Anagrams | 4520 |
249 | Reverse Only Letters LeetCode Solution | 4519 |
250 | Next Permutation | 4519 |
251 | Check If N and Its Double Exist Leetcode Solution | 4516 |
252 | Number of Steps to Reduce a Number to Zero Leetcode Solution | 4503 |
253 | Min Cost Climbing Stairs LeetCode Solution | 4501 |
254 | Stock Buy Sell to Maximize Profit | 4494 |
255 | Minimum Knight Moves LeetCode Solution | 4481 |
256 | Prim’s Algorithm | 4473 |
257 | Find The Duplicate Number | 4462 |
258 | To Lower Case Leetcode Solution | 4447 |
259 | Student Attendance Record I Leetcode Solution | 4443 |
260 | Top K Frequent Elements | 4413 |
261 | The kth Factor of n Leetcode Solution | 4396 |
262 | Minimum Operations to convert X to Y | 4396 |
263 | Smallest Positive Number Missing in an Unsorted Array | 4372 |
264 | Reverse words in a string | 4366 |
265 | Maximum Subarray Sum using Divide and Conquer | 4366 |
266 | License Key Formatting Leetcode Solution | 4361 |
267 | Maximum Sum Increasing Subsequence | 4338 |
268 | Min Stack | 4323 |
269 | Search Suggestions System LeetCode Solution | 4318 |
270 | Maximum Population Year LeetCode Solution | 4316 |
271 | Find the Number Occurring Odd Number of Times in an Array | 4309 |
272 | Sum of Subarray Ranges Leetcode Solution | 4297 |
273 | Special Array With X Elements Greater Than or Equal X Leetcode Solution | 4278 |
274 | Single Number | 4263 |
275 | Find Words That Can Be Formed by Characters Leetcode Solution | 4255 |
276 | Reformat Date LeetCode Solution | 4242 |
277 | Top K Frequent Words LeetCode Solution | 4234 |
278 | Longest Common Subsequence | 4191 |
279 | Minimum Path Sum Leetcode Solution | 4188 |
280 | Remove Nth Node From End of List Leetcode Solution | 4180 |
281 | Reverse individual words | 4177 |
282 | N-th Tribonacci Number Leetcode Solution | 4172 |
283 | Intersection of Two Arrays | 4160 |
284 | Maximize Distance to Closest Person LeetCode Solution | 4143 |
285 | Last Stone Weight II LeetCode Solution | 4142 |
286 | Maximum Depth of Binary Tree Leetcode Solution | 4137 |
287 | Reveal Cards In Increasing Order Leetcode Solution | 4135 |
288 | Evaluate Division | 4132 |
289 | Pairs of Songs With Total Durations Divisible by 60 LeetCode Solution | 4126 |
290 | Remove Duplicates from Sorted List LeetCode Solution | 4126 |
291 | BFS for Disconnected Graph | 4118 |
292 | Best Time to Buy and Sell Stock III Leetcode Solution | 4106 |
293 | Minimum Characters to be Added at Front to Make String Palindrome | 4105 |
294 | Diagonal Traverse LeetCode Solution | 4098 |
295 | House Robber | 4096 |
296 | Count of index pairs with equal elements in an array | 4079 |
297 | Find any one of the multiple repeating elements in read only array | 4073 |
298 | Most Frequent Element in an Array | 4066 |
299 | Find if Path Exists in Graph Leetcode Solution | 4065 |
300 | Count Number of Occurrences in a Sorted Array | 4053 |
301 | Design A Leaderboard Leetcode Solution | 4050 |
302 | Sort Elements by Frequency of Occurrences | 4038 |
303 | Binary Tree Inorder Traversal LeetCode Solution | 4034 |
304 | Length of Longest valid Substring | 4034 |
305 | Minimum number of Merge Operations to make an Array Palindrome | 4026 |
306 | Implement a stack using single queue | 4011 |
307 | Find the Closest Palindrome number | 3989 |
308 | Range Sum Query 2D – Immutable Leetcode Solution | 3966 |
309 | Find Leaves of Binary Tree LeetCode Solution | 3962 |
310 | Brightest Position on Street LeetCode Solution | 3954 |
311 | Maximum Size Subarray Sum Equals k Leetcode Solution | 3935 |
312 | Partition Array Into Three Parts With Equal Sum Leetcode Solution | 3932 |
313 | Invalid Transactions LeetCode Solution | 3929 |
314 | Spiral Matrix II Leetcode Solution | 3922 |
315 | Shortest Word Distance Leetcode Solution | 3917 |
316 | Sort Array By Parity II Leetcode Solution | 3906 |
317 | Mobile Numeric Keypad Problem | 3906 |
318 | Reverse Bits | 3896 |
319 | Special Positions in a Binary Matrix Leetcode Solution | 3895 |
320 | Remove All Ones With Row and Column Flips Leetcode Solution | 3888 |
321 | Symmetric Tree Leetcode Solution | 3888 |
322 | Sudoku Solver | 3886 |
323 | Arrange given Numbers to Form the Biggest Number II | 3886 |
324 | Find Index of Closing Bracket for a Given Opening Bracket in an Expression | 3884 |
325 | Reverse Nodes in k-Group LeetCode Solution | 3877 |
326 | Diagonal Traversal LeetCode Solution | 3856 |
327 | Paint House LeetCode Solution | 3844 |
328 | Binary Tree Zigzag Level Order Traversal LeetCode Solution | 3838 |
329 | One Edit Distance LeetCode Solution | 3835 |
330 | Jump Game | 3828 |
331 | Remove Invalid Parentheses Leetcode Solution | 3824 |
332 | Find Duplicates in an Array in Most Efficient Way | 3814 |
333 | Construct BST from its given Level Order Traversal | 3803 |
334 | Rank Transform of an Array Leetcode Solution | 3800 |
335 | Alien Dictionary LeetCode Solution | 3794 |
336 | Unique Paths | 3786 |
337 | Maximum Subarray | 3769 |
338 | Partition Labels LeetCode Solution | 3765 |
339 | Minimum Moves to Equal Array Elements Leetcode Solution | 3763 |
340 | Hamming Distance Leetcode Solution | 3744 |
341 | Minimum operation to make all elements equal in array | 3744 |
342 | Largest Rectangle in Histogram LeetCode Solution | 3740 |
343 | Least Number of Unique Integers after K Removals Leetcode Solution | 3739 |
344 | Split Linked List in Parts Leetcode Solution | 3735 |
345 | Lowest Common Ancestor of a Binary Tree Leetcode Solution | 3735 |
346 | Bitwise AND of Numbers Range LeetCode Solution | 3735 |
347 | Minimum Depth of Binary Tree Leetcode Solution | 3730 |
348 | Round Robin Scheduling | 3730 |
349 | Maximal Square | 3730 |
350 | The Celebrity Problem | 3727 |
351 | Tug of War | 3726 |
352 | Range Sum of BST LeetCode Solution | 3724 |
353 | Pair of Positive Negative Values in an Array | 3721 |
354 | Maximum Length of a Concatenated String with Unique Characters Leetcode Solution | 3714 |
355 | String Matching in an Array Leetcode Solution | 3709 |
356 | Check whether Strings are K Distance Apart or Not | 3708 |
357 | Smallest Subarray with k Distinct Numbers | 3707 |
358 | Next Permutation LeetCode Solution | 3701 |
359 | Find Winner on a Tic Tac Toe Game Leetcode Solution | 3698 |
360 | Maximum Circular Subarray Sum | 3698 |
361 | Dijkstra Algorithm | 3695 |
362 | Minimum Time to Collect All Apples in a Tree LeetCode Solution | 3673 |
363 | Minimum Time Visiting All Points Leetcode Solution | 3668 |
364 | Count of Triplets With Sum Less than Given Value | 3666 |
365 | Longest Common Prefix using Trie | 3664 |
366 | Clone Graph LeetCode Solution | 3663 |
367 | Minimum Cost to Hire K Workers | 3658 |
368 | Given an Array of Pairs Find all Symmetric Pairs in it | 3657 |
369 | Merge Two Sorted Linked Lists | 3654 |
370 | Next Greater Element III LeetCode Solution | 3652 |
371 | Regular Expression Matching Regular Expression Matching LeetCode Solution | 3643 |
372 | Find minimum difference between any two elements | 3638 |
373 | K Empty Slots LeetCode | 3638 |
374 | Minimize Maximum Pair Sum in Array LeetCode Solution | 3632 |
375 | Check if a given array contains duplicate elements within k distance from each other | 3626 |
376 | Sort a stack using a temporary stack | 3625 |
377 | Ugly Number II LeetCode Solution | 3623 |
378 | Transpose Graph | 3608 |
379 | Implementation of Deque using circular array | 3608 |
380 | Robot Bounded In Circle LeetCode Solution | 3599 |
381 | Minimum Number of Steps to Make Two Strings Anagram Leetcode Solutions | 3596 |
382 | Non-decreasing Array LeetCode Solution | 3588 |
383 | Invert Binary Tree LeetCode Solution | 3578 |
384 | Best Time to Buy and Sell Stock with Cooldown Leetcode Solution | 3574 |
385 | Unique Paths III LeetCode Solution | 3570 |
386 | Permutation Sequence LeetCode Solution | 3569 |
387 | Longest subarray not having more than K distinct elements | 3562 |
388 | Substring with Concatenation of All Words Leetcode Solution | 3555 |
389 | Missing Element in Sorted Array LeetCode Solution | 3554 |
390 | Find duplicates in a given array when elements are not limited to a range | 3553 |
391 | Longest Substring with At Most K Distinct Characters LeetCode Solution | 3544 |
392 | Find the Smallest Divisor given a Threshold Leetcode Solution | 3542 |
393 | Sliding Window Technique | 3541 |
394 | Find the First and Second Smallest Elements | 3541 |
395 | Validate Stack Sequences LeetCode Solution | 3539 |
396 | Postfix to Prefix Conversion | 3534 |
397 | Invert Binary Tree LeetCode Solution | 3533 |
398 | Stack Permutations (Check if an array is stack permutation of other) | 3533 |
399 | Find Top K (or Most Frequent) Numbers in a Stream | 3532 |
400 | First Circular Tour to Visit all the Petrol Bunks | 3532 |
401 | Number of Islands II LeetCode Solution | 3526 |
402 | Design Browser History LeetCode Solution | 3525 |
403 | Longest subsequence such that difference between adjacents is one | 3524 |
404 | LRU Cache Implementation | 3524 |
405 | Path With Maximum Minimum Value LeetCode Solution | 3523 |
406 | Find the subarray with least average | 3523 |
407 | Common elements in all rows of a given matrix | 3521 |
408 | Kth Smallest Element in a BST Leetcode Solution | 3519 |
409 | Graph Valid Tree LeetCode Solution | 3518 |
410 | Queries for counts of array elements with values in given range | 3515 |
411 | Find Maximum Level sum in Binary Tree | 3512 |
412 | Word Search | 3509 |
413 | Stone Game II Leetcode | 3504 |
414 | Kruskal Algorithm | 3503 |
415 | Combination Sum IV LeetCode Solution | 3499 |
416 | K Closest Points to Origin Leetcode Solution | 3496 |
417 | Toeplitz Matrix | 3495 |
418 | Partition List Leetcode Solution | 3494 |
419 | Sequences of given length where every element is more than or equal to twice of previous | 3489 |
420 | Snakes and Ladders LeetCode Solution | 3488 |
421 | Integer Break LeetCode Solution | 3487 |
422 | Number Complement Leetcode Solution | 3478 |
423 | Maximum Number of Occurrences of a Substring Leetcode Solution | 3474 |
424 | Number of Smaller Elements on Right Side | 3474 |
425 | Convert Sorted Array to Binary Search Tree LeetCode Solutions | 3471 |
426 | Search a 2D Matrix II Leetcode Solution | 3467 |
427 | Painting Fence Algorithm | 3467 |
428 | Longest Palindrome can be Formed by Removing or Rearranging Characters | 3455 |
429 | Find the Peak Element from an Array | 3447 |
430 | Max stack | 3444 |
431 | Sort elements by frequency | 3443 |
432 | Odd Even Linked List Leetcode Solution | 3438 |
433 | Recursion | 3430 |
434 | Minesweeper LeetCode Solution | 3418 |
435 | Priority Queue using doubly linked list | 3416 |
436 | Consecutive Characters LeetCode Solution | 3404 |
437 | Can Make Arithmetic Progression From Sequence Leetcode Solution | 3403 |
438 | Insert Interval Leetcode Solution | 3399 |
439 | LRU Cache Leetcode Solution | 3398 |
440 | Check if Two given Strings are Isomorphic to each other | 3398 |
441 | Search in a Binary Search Tree Leetcode Solution | 3396 |
442 | Top View of Binary Tree | 3394 |
443 | Nth Catalan Number | 3391 |
444 | 3 Sum | 3389 |
445 | Find Minimum in Rotated Sorted Array II LeetCode Solution | 3383 |
446 | Maximum Consecutive Numbers Present in an Array | 3382 |
447 | Rearrange array such that even positioned are greater than odd | 3381 |
448 | Flood Fill LeetCode | 3370 |
449 | Expression Contains Redundant Bracket or Not | 3353 |
450 | Design a stack that supports getMin() in O(1) time and O(1) extra space | 3351 |
451 | Number of Closed Islands Leetcode Solution | 3348 |
452 | Minimum Absolute Difference in BST Leetcode Solution | 3343 |
453 | Kth Non-repeating Character | 3339 |
454 | Distance of nearest cell having 1 in a binary matrix | 3336 |
455 | Decompress Run-Length Encoded List Leetcode Solution | 3335 |
456 | Find a Peak Element II LeetCode Solution | 3334 |
457 | Replace Elements with Greatest Element on Right Side Leetcode Solution | 3328 |
458 | Move All the Zeros to the End of the Given Array | 3325 |
459 | Shortest Palindrome | 3320 |
460 | Check If Array Pairs Are Divisible by k LeetCode Solution | 3317 |
461 | Spiral Matrix III LeetCode Solution | 3311 |
462 | Insert into a Binary Search Tree Leetcode Solution | 3308 |
463 | High Five LeetCode Solution | 3304 |
464 | Integer to English words | 3304 |
465 | Gold Mine Problem | 3299 |
466 | Restore IP Addresses Leetcode Solution | 3296 |
467 | Sliding Window Maximum LeetCode Solution | 3295 |
468 | 4Sum | 3285 |
469 | Balanced Expression with Replacement | 3283 |
470 | Sorting array using Stacks | 3276 |
471 | Queries for GCD of all numbers of an array except elements in a given range | 3275 |
472 | Best Time to Buy and Sell Stock | 3274 |
473 | Binary Tree Maximum Path Sum LeetCode Solution | 3273 |
474 | Convert Sorted Array to Binary Search Tree Leetcode Solution | 3273 |
475 | Minimum Path Sum | 3272 |
476 | N queen problem | 3262 |
477 | Find All Possible Recipes from Given Supplies LeetCode Solution | 3260 |
478 | Cells with Odd Values in a Matrix LeetCode Solution | 3255 |
479 | Rearrange an array in order – smallest, largest, 2nd smallest, 2nd largest | 3255 |
480 | Trapping Rain Water LeetCode Solution | 3253 |
481 | Tiling Problem | 3249 |
482 | Priority Queue in C++ | 3248 |
483 | Majority Element | 3248 |
484 | Find Pythagorean Triplets from Array | 3244 |
485 | Palindrome Substring Queries | 3238 |
486 | Sort Colors | 3238 |
487 | The Stock Span Problem | 3235 |
488 | Longest Common Prefix using Sorting | 3228 |
489 | Vertical Order Traversal of Binary Tree LeetCode Solution | 3218 |
490 | Minimum Number of Taps to Open to Water a Garden LeetCode Solution | 3214 |
491 | Number of Days Between Two Dates LeetCode Solution | 3213 |
492 | Sliding Window Median Leetcode Solution | 3212 |
493 | Is Graph Bipartite? LeetCode Solution | 3210 |
494 | Evaluate Reverse Polish Notation LeetCode Solution | 3210 |
495 | Sort an array according to the order defined by another array | 3204 |
496 | Coin Change Problem | 3203 |
497 | Count items common to both the lists but with different prices | 3198 |
498 | Path Sum II LeetCode Solution | 3194 |
499 | Fibonacci Number LeetCode Solution | 3193 |
500 | Reverse a linked list | 3183 |
501 | Find the first Repeating Number in a Given Array | 3178 |
502 | Pancake Sorting Problem | 3177 |
503 | Different Ways to Add Parentheses Leetcode Solution | 3174 |
504 | Camelcase Matching Leetcode Solution | 3162 |
505 | Largest rectangular sub-matrix whose sum is 0 | 3162 |
506 | How to Implement Stack Using Priority Queue or Heap? | 3161 |
507 | Kth ancestor of a node in binary tree | 3156 |
508 | Custom Sort String Leetcode Solution | 3152 |
509 | Shortest Completing Word Leetcode Solution | 3150 |
510 | Interval Tree | 3148 |
511 | Intersection of Two Linked Lists LeetCode Solution | 3144 |
512 | Design Hit Counter LeetCode Solution | 3144 |
513 | Check if Array Contains Contiguous Integers With Duplicates Allowed | 3143 |
514 | Longest Increasing Path in a Matrix LeetCode Solution | 3136 |
515 | Queue using Stacks | 3135 |
516 | Multiplication of Two Matrices | 3135 |
517 | Find a Fixed Point in a Given Array | 3134 |
518 | Analyze User Website Visit Pattern LeetCode Solution | 3130 |
519 | Count subarrays having total distinct elements same as original array | 3127 |
520 | Scramble String LeetCode Solution | 3125 |
521 | Divide Chocolate LeetCode Solution | 3121 |
522 | Determine Whether Matrix Can Be Obtained By Rotation LeetCode Solution | 3121 |
523 | Sieve of Eratosthenes | 3120 |
524 | Detect a loop in the Linked List | 3114 |
525 | Find Median from Data Stream LeetCode Solution | 3111 |
526 | Implement Trie (Prefix Tree) Leetcode Solution | 3090 |
527 | Group Anagrams | 3089 |
528 | Perfect Squares LeetCode Solution | 3083 |
529 | Subset sum problem | 3083 |
530 | Generate all Binary Strings from Given Pattern | 3079 |
531 | Count Submatrices With All Ones LeetCode Solution | 3077 |
532 | Fibonacci numbers | 3075 |
533 | Reorder Data in Log Files LeetCode Solution | 3072 |
534 | Queue based approach for first non-repeating character in a stream | 3067 |
535 | Best Time to Buy and Sell Stock with Transaction Fee Leetcode Solution | 3066 |
536 | Insert Node in the Sorted Linked List | 3066 |
537 | Number of Distinct Islands Leetcode Solution | 3065 |
538 | Path Crossing Leetcode Solution | 3065 |
539 | Longest Common Prefix using Divide and Conquer | 3064 |
540 | Maximum Sum of Non Consecutive Elements | 3062 |
541 | Find the Lost Element From a Duplicated Array | 3054 |
542 | Valid Boomerang Leetcode Solution | 3050 |
543 | Minimum Height Trees | 3040 |
544 | How to Create Mergable Stack? | 3034 |
545 | Champagne Tower LeetCode Solution | 3033 |
546 | Monotonic Array Leetcode Solution | 3024 |
547 | Palindrome Permutation LeetCode Solution | 3023 |
548 | Merge Overlapping Intervals | 3023 |
549 | Construction of Longest Increasing Subsequence (N log N) | 3021 |
550 | Shifting Letters LeetCode Solution | 3017 |
551 | Count Possible Triangles | 3016 |
552 | Race Car LeetCode Solution | 3014 |
553 | Decode Ways | 3014 |
554 | Decode String | 3010 |
555 | Build an Array With Stack Operations Leetcode Solution | 3008 |
556 | Sort a stack using recursion | 3007 |
557 | Find if an Expression has Duplicate Parenthesis or Not | 3007 |
558 | Find a Sorted Subsequence of size 3 | 3006 |
559 | Merge Two Binary Trees LeetCode Solution | 3001 |
560 | Make Two Arrays Equal by Reversing Sub-arrays Leetcode Solution | 3001 |
561 | Find maximum length Snake sequence | 3000 |
562 | LCS (Longest Common Subsequence) of three strings | 2996 |
563 | Nearest Exit from Entrance in Maze LeetCode Solution | 2990 |
564 | Smallest Good Base | 2988 |
565 | Minimum Bracket Reversals | 2987 |
566 | Print all Palindromic Partitions of a String | 2985 |
567 | Most Stones Removed with Same Row or Column LeetCode Solution | 2982 |
568 | Sliding Window Maximum | 2980 |
569 | First missing positive | 2979 |
570 | Recover Binary Search Tree | 2979 |
571 | Number of Equivalent Domino Pairs Leetcode Solution | 2975 |
572 | Largest Subarray with Equal Number of 0’s and 1’s | 2970 |
573 | Minimum Height Trees LeetCode Solution | 2967 |
574 | Recover Binary Search Tree Leetcode Solution | 2964 |
575 | Palindrome Partitioning Leetcode Solution | 2960 |
576 | Rectangle Overlap LeetCode Solution | 2958 |
577 | Distance Between Bus Stops Leetcode Solution | 2958 |
578 | Morris Traversal | 2956 |
579 | Letter Case Permutation | 2955 |
580 | Maximum Element in an Array which is Increasing and then Decreasing | 2951 |
581 | Maximum Number of Ways to Partition an Array LeetCode Solution | 2946 |
582 | Longest Substring with At Least K Repeating Characters LeetCode Solution | 2944 |
583 | Minimum number of jumps to reach end | 2937 |
584 | Reorder an Array According to the Given Indexes | 2937 |
585 | Guess Number Higher or Lower II | 2931 |
586 | Design a Stack With Increment Operation Leetcode Solution | 2930 |
587 | K-th Distinct Element in an Array | 2926 |
588 | Maximum Length of Chain Pairs | 2925 |
589 | Find the Town Judge LeetCode Solution | 2924 |
590 | Binary Tree zigzag level order Traversal | 2924 |
591 | Implement Two Stacks in an Array | 2923 |
592 | Implement strStr() LeetCode Solution | 2918 |
593 | Longest Repeated Subsequence | 2914 |
594 | Jump Game IV LeetCode Solution | 2909 |
595 | Maximum Depth of N-ary Tree Leetcode Solution | 2905 |
596 | Subarrays with K Different Integers Leetcode Solution | 2901 |
597 | Contiguous Array LeetCode Solution | 2894 |
598 | Mean of Array After Removing Some Elements Leetcode Solution | 2894 |
599 | Rearrange Spaces Between Words Leetcode Solution | 2888 |
600 | Find the two Numbers with Odd Occurrences in an Unsorted Array | 2888 |
601 | The Maze III LeetCode Solution | 2886 |
602 | Valid Parentheses Leetcode Solution | 2881 |
603 | All Possible Full Binary Trees LeetCode Solution | 2880 |
604 | Best Time to Buy and Sell Stock IV LeetCode Solution | 2873 |
605 | Sort a String According to Another String | 2871 |
606 | Contains Duplicate | 2864 |
607 | Check for Balanced Parentheses in an Expression | 2861 |
608 | Maximize Elements Using Another Array | 2860 |
609 | Design Skiplist LeetCode Solution | 2857 |
610 | Minimum Jumps to Reach Home LeetCode Solution | 2857 |
611 | Maximum sum rectangle in a 2D matrix | 2841 |
612 | Convert BST to Min Heap | 2832 |
613 | Palindrome Permutations of a String | 2830 |
614 | Iterative Method to find Height of Binary Tree | 2820 |
615 | Perform String Shifts Leetcode | 2819 |
616 | Maximum Score After Splitting a String Leetcode Solution | 2818 |
617 | Find the Minimum Element in a Sorted and Rotated Array | 2816 |
618 | Valid Sudoku | 2813 |
619 | Word Break | 2812 |
620 | Edit Distance LeetCode Solution | 2809 |
621 | Group Multiple Occurrence of Array Elements Ordered by first Occurrence | 2801 |
622 | Find the First Circular Tour that visits all the Petrol Pumps | 2801 |
623 | A Space Optimized DP solution for 0-1 Knapsack Problem | 2797 |
624 | Reach a Number LeetCode Solution | 2796 |
625 | Possible Bipartition LeetCode Solution | 2794 |
626 | Maximum Product of Splitted Binary Tree LeetCode Solution | 2789 |
627 | Best Meeting Point LeetCode Solution | 2785 |
628 | Count pair with Given Sum | 2771 |
629 | Find Largest Value in Each Tree Row LeetCode Solution | 2765 |
630 | Merge Two Balanced Binary Search Trees | 2762 |
631 | Number of palindromic paths in a matrix | 2761 |
632 | Check if the given array can represent Level Order Traversal of Binary Search Tree | 2754 |
633 | Sorted Linked List to Balanced BST | 2754 |
634 | Find the Subarray of given length with Least Average | 2749 |
635 | Count Sub Islands LeetCode Solution | 2747 |
636 | Swapping Nodes in a Linked List Leetcode Solution | 2746 |
637 | Merge Overlapping Intervals II | 2745 |
638 | My Calendar I LeetCode Solution | 2744 |
639 | Brick Wall LeetCode Solution | 2742 |
640 | Caesar Cipher | 2733 |
641 | Palindromic Substrings Leetcode Solution | 2725 |
642 | Level order Traversal in Spiral Form | 2724 |
643 | Lowest Common Ancestor of a Binary Search Tree Leetcode Solution | 2720 |
644 | Merge K Sorted Arrays and Print Sorted Output | 2713 |
645 | Segregate 0s and 1s in an Array | 2709 |
646 | Find Median from data Stream | 2704 |
647 | Pair with given product | 2702 |
648 | Word Pattern | 2697 |
649 | Number of Subsequences That Satisfy the Given Sum Condition LeetCode solution | 2691 |
650 | Construct BST from given Preorder Traversal | 2686 |
651 | Palindrome Permutation | 2682 |
652 | Print Fibonacci sequence using 2 variables | 2679 |
653 | Maximize Sum of Array after K Negations Leetcode Solution | 2678 |
654 | Heap Sort | 2676 |
655 | Find all triplets with zero sum | 2675 |
656 | All Unique Triplets that Sum up to a Given Value | 2672 |
657 | Find whether a subarray is in form of a mountain or not | 2670 |
658 | Maximum Frequency Stack Leetcode Solution | 2665 |
659 | Find all pairs (a, b) in an array such that a % b = k | 2665 |
660 | Validate Binary Search Tree | 2660 |
661 | Add two numbers | 2650 |
662 | Find First and Last Position of Element in Sorted Array LeetCode Solution | 2645 |
663 | Convert Sorted List to Binary Search Tree | 2644 |
664 | Longest Subarray Having Count of 1s One More than Count of 0s | 2643 |
665 | Bubble sort using two Stacks | 2642 |
666 | Count Distinct Elements in Every Window of Size K | 2640 |
667 | Find Zeros to be Flipped so that Number of Consecutive 1’s is Maximized | 2640 |
668 | Length of Longest Fibonacci Subsequence | 2636 |
669 | Minimum time required to rot all oranges | 2631 |
670 | How to Efficiently Implement k Stacks in a Single Array? | 2628 |
671 | Sort 0s 1s and 2s in an Array | 2627 |
672 | Isomorphic Strings LeetCode Solution | 2626 |
673 | Counting Bits | 2624 |
674 | Split Array Into Consecutive Subsequences | 2623 |
675 | Queries on Probability of Even or Odd Number in given Ranges | 2622 |
676 | Largest Sum Contiguous Subarray | 2621 |
677 | Find four elements that sum to a given value (Hashmap) | 2617 |
678 | Huffman Coding | 2617 |
679 | Detect Capital Leetcode Solution | 2615 |
680 | Rearrange Array such that arr[i] >= arr[j] if i is even and arr[i] <= arr[j] if i is odd and j < i | 2607 |
681 | Binary Tree Right Side View LeetCode Solution | 2606 |
682 | Partition Problem | 2604 |
683 | Minimum Swaps to Group All 1’s Together Leetcode Solution | 2597 |
684 | Shortest Path in a Grid with Obstacles Elimination LeetCode Solution | 2595 |
685 | Populating Next Right Pointers in Each Node Leetcode Solution | 2592 |
686 | Print all subarrays with 0 sum | 2590 |
687 | Remove Palindromic Subsequences Leetcode Solution | 2588 |
688 | Range Sum Query 2D – Immutable LeetCode Solution | 2587 |
689 | Remove brackets from an algebraic string containing + and – operators | 2587 |
690 | Count ways to reach the nth stair using step 1, 2 or 3 | 2581 |
691 | Populating Next Right Pointers in Each Node | 2576 |
692 | String comparison containing wildcards | 2575 |
693 | Rotate Array | 2574 |
694 | Arithmetic Slices II – Subsequence LeetCode Solution | 2570 |
695 | Count Good Nodes in Binary Tree LeetCode Solution | 2569 |
696 | Partition to K Equal Sum Subsets Leetcode Solution | 2562 |
697 | Binary Tree to Binary Search Tree Conversion | 2551 |
698 | Find pairs with given sum such that elements of pair are in different rows | 2549 |
699 | Merge Two Sorted Lists Leetcode | 2543 |
700 | Maximum Number of Chocolates to be Distributed Equally Among k Students | 2540 |
701 | Concatenation of Array LeetCode Solution | 2535 |
702 | Filter Restaurants by Vegan-Friendly, Price and Distance Leetcode Solution | 2535 |
703 | Check if a Linked list of Strings form a Palindrome | 2535 |
704 | Minimum Sum Path in a Triangle | 2529 |
705 | Web Crawler LeetCode Solution | 2526 |
706 | Happy Number | 2517 |
707 | Swap Kth Node from beginning with Kth Node from End | 2512 |
708 | Find Duplicate Subtrees | 2502 |
709 | Check if String Follows Order of Characters by a Pattern or not | 2501 |
710 | Difference Array | Range update query in O(1) | 2497 |
711 | Inorder Successor of a node in Binary Tree | 2496 |
712 | Queue Reconstruction by Height | 2496 |
713 | Contiguous Array Leetcode | 2495 |
714 | Increasing Subsequence of Length three with Maximum Product | 2495 |
715 | Topological Sorting | 2493 |
716 | Find All Pairs With a Given Difference | 2488 |
717 | Breadth First Search (BFS) for a Graph | 2485 |
718 | Alien Dictionary | 2480 |
719 | Remove duplicates from sorted array | 2467 |
720 | Maximum Distance in Array | 2466 |
721 | Longest Common Prefix Using Binary Search II | 2464 |
722 | Root to Leaf path with target sum Leetcode Solutions | 2462 |
723 | Partition Equal Subset Sum | 2458 |
724 | Maximum Product Subarray II | 2458 |
725 | Container with Most Water | 2456 |
726 | Elements Appear more than N/K times in Array | 2452 |
727 | Count Minimum Steps to Get the given Array | 2441 |
728 | Sum Root to Leaf Numbers LeetCode Solution | 2438 |
729 | Minimum Swaps to Make Strings Equal Leetcode Solution | 2437 |
730 | Substring With Concatenation Of All Words | 2436 |
731 | Climbing stairs | 2430 |
732 | Finding K closest element | 2421 |
733 | Delete Nodes and Return Forest Leetcode Solution | 2416 |
734 | Deletion in a Binary Tree | 2415 |
735 | Reverse Nodes in K-Group | 2414 |
736 | An Interesting Method to generate Binary Numbers from 1 to n | 2413 |
737 | Longest Increasing Subsequence | 2406 |
738 | Score of Parenthesis LeetCode Solution | 2405 |
739 | Parallel Courses II LeetCode Solution | 2402 |
740 | Construct Binary Tree from Preorder and Postorder Traversal LeetCode Solution | 2401 |
741 | Minimum Number of Arrows to Burst Balloons LeetCode Solution | 2400 |
742 | Delete Nth node from the end of the given linked list | 2400 |
743 | Minimum Cost to Move Chips to The Same Position LeetCode Solution | 2399 |
744 | Symmetric Tree | 2398 |
745 | Iterative Depth First Traversal of Graph | 2394 |
746 | Find the first repeating element in an array of integers | 2393 |
747 | Merge K Sorted Linked Lists | 2385 |
748 | Longest Common Prefix Word by Word Matching | 2385 |
749 | Check if all levels of two Binary Tree are anagrams or not | 2384 |
750 | Linked List Cycle | 2383 |
751 | Kill Process LeetCode Solution | 2377 |
752 | Union and Intersection of two Linked Lists | 2373 |
753 | Boundary Traversal of binary tree | 2372 |
754 | Sort Array by Increasing Frequency Leetcode Solution | 2371 |
755 | Minimum Size Subarray Sum | 2371 |
756 | Find K Closest Elements LeetCode Solution | 2367 |
757 | MiniMax Algorithm | 2362 |
758 | Pancake Sorting | 2362 |
759 | Verify Preorder Serialization of a Binary Tree | 2361 |
760 | Non-overlapping sum of two sets | 2360 |
761 | Rearrange an Array Such that arr[i] is equal to i | 2359 |
762 | Find Maximum of Minimum for Every Window Size in a Given Array | 2358 |
763 | Iterative Preorder Traversal | 2356 |
764 | Level of Each node in a Tree from source node | 2355 |
765 | Minimum Remove to Make Valid Parentheses LeetCode Solution | 2349 |
766 | Nested List Weight Sum II LeetCode Solution | 2348 |
767 | New 21 Game | 2348 |
768 | Construct Binary Tree from given Parent Array representation | 2347 |
769 | Reservoir Sampling | 2340 |
770 | Level order traversal using two Queues | 2336 |
771 | Check if a queue can be sorted into another queue using a stack | 2334 |
772 | Given a binary tree, how do you remove all the half nodes? | 2330 |
773 | BFS vs DFS for Binary Tree | 2329 |
774 | Find the Difference Leetcode Solution | 2327 |
775 | Count pairs from two linked lists whose sum is equal to a given value | 2327 |
776 | Valid Anagrams | 2325 |
777 | Merging Intervals | 2317 |
778 | Reorder Array Using Given Indexes | 2315 |
779 | Range LCM Queries | 2313 |
780 | Matrix Chain Multiplication | 2311 |
781 | Maximum size subarray sum equals k | 2309 |
782 | Palindrome Partitioning | 2307 |
783 | Smallest Range II Leetcode Solution | 2302 |
784 | Flatten Binary Tree to Linked List LeetCode Solution | 2298 |
785 | K maximum sums of overlapping contiguous sub-arrays | 2298 |
786 | Vertical sum in a given binary tree | 2297 |
787 | Maximum Product Subarray | 2295 |
788 | Remove Duplicates from Sorted List II | 2293 |
789 | Defanging an IP Address LeetCode Solution | 2290 |
790 | Sum of f(a[i], a[j]) over all pairs in an array of n integers | 2288 |
791 | Print a Binary Tree in Vertical Order | 2280 |
792 | Friends Of Appropriate Ages LeetCode Solution | 2278 |
793 | Check if Two Expressions With Brackets are Same | 2270 |
794 | Valid Triangle Number LeetCode Solution | 2264 |
795 | Maximum difference between two elements such as larger element comes after smaller | 2262 |
796 | Super Ugly Number | 2259 |
797 | Flatten 2D Vector LeetCode Solution | 2257 |
798 | Largest Submatrix With Rearrangements LeetCode Solution | 2257 |
799 | Find subarray with given sum (Handles Negative Numbers) | 2253 |
800 | Find Three Element From Different Three Arrays Such That a + b + c = sum | 2251 |
801 | Balanced Binary Tree | 2251 |
802 | Number Of Longest Increasing Subsequence | 2250 |
803 | Check if any two intervals overlap among a given set of intervals | 2248 |
804 | The Painter’s Partition Problem | 2244 |
805 | Find Maximum Sum Possible Equal Sum of Three Stacks | 2244 |
806 | Find K Length Subarray of Maximum Average | 2242 |
807 | Employee Importance LeetCode Solution | 2240 |
808 | Minimum Distance Between BST Nodes Leetcode Solution | 2238 |
809 | Check if a given array can represent Preorder Traversal of Binary Search Tree | 2234 |
810 | Lowest Common Ancestor | 2233 |
811 | Boolean Parenthesization Problem | 2226 |
812 | Unique Binary Search Trees LeetCode Solution | 2225 |
813 | Count number of triplets with product equal to given number | 2219 |
814 | Find Peak Element | 2218 |
815 | Missing Number | 2218 |
816 | Closest Leaf in a Binary Tree LeetCode Solution | 2214 |
817 | Check if two nodes are on the same path in a Tree | 2214 |
818 | Maximum subsequence sum such that no three are consecutive | 2213 |
819 | Minimum insertions to form a palindrome with permutations allowed | 2209 |
820 | Create Maximum Number | 2209 |
821 | Third Maximum Number Leetcode Solution | 2207 |
822 | Array Nesting Leetcode Solution | 2207 |
823 | Find Smallest Range Containing Elements from k Lists | 2204 |
824 | Largest BST Subtree LeetCode Solution | 2202 |
825 | Kth Smallest Element in a Sorted Matrix LeetCode Solution | 2199 |
826 | Peak Index in a Mountain Array LeetCode Solution | 2196 |
827 | Check Completeness of a Binary Tree LeetCode Solution | 2188 |
828 | Find distance between two nodes of a Binary Tree | 2187 |
829 | Distinct Subsequences | 2185 |
830 | Valid Triangle Number LeetCode Solution | 2184 |
831 | Newman-Conway Sequence | 2178 |
832 | Hamming Distance | 2175 |
833 | Find Sum of all unique sub-array sum for a given array | 2174 |
834 | Print All Distinct Elements of a Given Integer Array | 2173 |
835 | Find Common Characters Leetcode Solution | 2168 |
836 | Maximum number of segments of lengths a, b and c | 2168 |
837 | Largest divisible pairs subset | 2168 |
838 | Find Element Using Binary Search in Sorted Array | 2167 |
839 | Arrange given numbers to form the biggest number | 2165 |
840 | Valid Parenthesis String | 2164 |
841 | First Bad Version | 2160 |
842 | Sorting a K Sorted Array | 2157 |
843 | Number of siblings of a given Node in n-ary Tree | 2156 |
844 | Print all triplets in sorted array that form AP | 2153 |
845 | Merging Two Sorted Arrays | 2152 |
846 | Products of ranges in an array | 2148 |
847 | Bottom View of a Binary Tree | 2144 |
848 | Longest Palindromic Subsequence | 2144 |
849 | Sort Elements by Frequency II | 2141 |
850 | Path Sum | 2139 |
851 | Iterative Postorder Traversal Using Two Stacks | 2135 |
852 | Tree Traversal (Preorder, Inorder & Postorder) | 2135 |
853 | Lower Case To Upper Case | 2132 |
854 | Stone Game IV LeetCode Solution | 2128 |
855 | Find the largest multiple of 3 | 2118 |
856 | Four Elements that Sum to Given | 2118 |
857 | Shuffle an Array | 2115 |
858 | Largest subarray with equal number of 0s and 1s | 2114 |
859 | Diagonal Traversal of Binary Tree | 2109 |
860 | Count and Say | 2104 |
861 | Print Right View of a Binary Tree | 2103 |
862 | Range Sum Query using Sparse Table | 2102 |
863 | Stone Game IV LeetCode Solution | 2101 |
864 | Merge Two Sorted Arrays | 2100 |
865 | Encoded String With Shortest Length LeetCode Solution | 2097 |
866 | Median of Two Sorted Arrays | 2096 |
867 | Compare Strings by Frequency of the Smallest Character Leetcode Solution | 2094 |
868 | Subset Sum Problem in O(sum) space | 2092 |
869 | Segment Tree | 2091 |
870 | Averages of Levels in Binary Tree | 2085 |
871 | Permutations of a Given String Using STL | 2084 |
872 | Isomorphic Strings | 2083 |
873 | Contiguous Array | 2082 |
874 | Binary array after M range toggle operations | 2077 |
875 | Longest Bitonic Subsequence | 2076 |
876 | Next Greater Element in an Array | 2075 |
877 | Closest Binary Search Tree Value Leetcode Solution | 2072 |
878 | Find Nth Node | 2070 |
879 | Unique Binary Search Trees | 2069 |
880 | Maximum Sum of 3 Non-Overlapping Subarrays | 2067 |
881 | Minimum Swaps To Make Sequences Increasing LeetCode Solution | 2066 |
882 | Valid Number | 2064 |
883 | Infix to Postfix | 2064 |
884 | Find Largest d in Array such that a + b + c = d | 2063 |
885 | Find unique character in a string | 2063 |
886 | Red-Black Tree Introduction | 2056 |
887 | Maximum difference between frequency of two elements such that element having greater frequency is also greater | 2053 |
888 | Orderly Queue LeetCode Solution | 2052 |
889 | Rearrange an array such that ‘arr[j]’ becomes ‘i’ if ‘arr[i]’ is ‘j’ | 2051 |
890 | Count Primes in Ranges | 2045 |
891 | Height of a generic tree from parent array | 2044 |
892 | Maximum Population Year LeetCode Solution | 2043 |
893 | Transform a BST to Greater sum Tree | 2039 |
894 | Binary Tree Longest Consecutive Sequence LeetCode Solution | 2033 |
895 | Maximum Side Length of a Square with Sum Less than or Equal to Threshold LeetCode Solution | 2031 |
896 | Bold Words in String LeetCode Solution | 2031 |
897 | Maximum Product Subarray | 2026 |
898 | Friends Pairing Problem | 2023 |
899 | Minimum sum of squares of character counts in a given string after removing k characters | 2013 |
900 | Valid Perfect Square LeetCode Solution | 2008 |
901 | Range Minimum Query (Square Root Decomposition and Sparse Table) | 2003 |
902 | Insert Delete GetRandom | 2003 |
903 | Trapping Rain Water II LeetCode Solution | 1998 |
904 | Serialize and Deserialize Binary Tree | 1997 |
905 | Sentence Screen Fitting LeetCode Solution | 1996 |
906 | Kth Smallest Number in Multiplication Table Leetcode Solution | 1996 |
907 | Swap Nodes In Pairs | 1992 |
908 | Binary Search Tree Delete Operation | 1988 |
909 | Shuffle a given Array | 1987 |
910 | Diameter of N-Ary Tree LeetCode Solution | 1983 |
911 | Step-By-Step Directions From a Binary Tree Node to Another LeetCode Solution | 1977 |
912 | Write a function to get the intersection point of two Linked Lists | 1977 |
913 | The Number of Weak Characters in the Game LeetCode Solution | 1975 |
914 | Next greater element | 1975 |
915 | Integer to Roman | 1963 |
916 | Reorganize String | 1955 |
917 | Convert BST into a Min-Heap without using array | 1954 |
918 | Array Queries for multiply replacements and product | 1945 |
919 | Maximum Product Subarray | 1942 |
920 | Find Minimum In Rotated Sorted Array | 1934 |
921 | K’th Largest Element in BST when modification to BST is not allowed | 1928 |
922 | Total Hamming Distance LeetCode Solution | 1927 |
923 | Next Greater Element II LeetCode Solution | 1925 |
924 | Koko Eating Bananas LeetCode Solution | 1924 |
925 | Advantages of BST over Hash Table | 1924 |
926 | Maximum Sum Increasing Subsequence | 1910 |
927 | Edit Distance | 1910 |
928 | Constant time range add operation on an array | 1908 |
929 | Best Meeting Point LeetCode Solution | 1906 |
930 | Longest Increasing Consecutive Subsequence | 1905 |
931 | Lowest Common Ancestor in Binary Search Tree | 1904 |
932 | Level Order Traversal of Binary Tree | 1904 |
933 | Check if an Array is Stack Sortable | 1900 |
934 | Serialize and Deserialize Binary Tree LeetCode Solution | 1899 |
935 | Clone a Binary Tree with Random Pointers | 1896 |
936 | Find the smallest binary digit multiple of given number | 1895 |
937 | Image Overlap LeetCode Solution | 1891 |
938 | Moving Stones Until Consecutive Leetcode Solution | 1887 |
939 | Power of Two | 1886 |
940 | Print n terms of Newman-Conway Sequence | 1883 |
941 | Range Queries for Longest Correct Bracket Subsequence | 1878 |
942 | K’th Largest element in BST using constant extra space | 1878 |
943 | Reverse a Path in BST using Queue | 1878 |
944 | Numbers with prime frequencies greater than or equal to k | 1876 |
945 | Write Code to Determine if Two Trees are Identical | 1875 |
946 | Greatest Sum Divisible by Three LeetCode Solution | 1874 |
947 | Valid Tic-Tac-Toe State LeetCode Solution | 1873 |
948 | Queries on XOR of greatest odd divisor of the range | 1867 |
949 | Design Underground System Leetcode Solution | 1866 |
950 | A program to check if a binary tree is BST or not | 1866 |
951 | Check for Palindrome after every character replacement Query | 1856 |
952 | Count and Toggle Queries on a Binary Array | 1855 |
953 | Print Next Greater Number of Q queries | 1855 |
954 | Insert into a Sorted Circular Linked List LeetCode Solution | 1854 |
955 | Design Add and Search Words Data Structure LeetCode Solution | 1854 |
956 | Closest Binary Search Tree Value II LeetCode Solution | 1851 |
957 | Find the node with minimum value in a Binary Search Tree | 1851 |
958 | Factorial Trailing Zeroes LeetCode Solution | 1848 |
959 | Largest Plus Sign Leetcode Solution | 1841 |
960 | Number of Orders in the Backlog Leetcode Solution | 1839 |
961 | Count the Pairs at Same Distance as in English Alphabets | 1838 |
962 | Check if X can give change to every person in the Queue | 1837 |
963 | Queries for Decimal Values of Subarrays of a Binary Array | 1836 |
964 | Check if each internal node of a BST has exactly one child | 1836 |
965 | Maximum Array from Two given Arrays Keeping Order Same | 1831 |
966 | Collect maximum points in a grid using two traversals | 1827 |
967 | Merge two BSTs with limited extra space | 1826 |
968 | Find minimum number of merge operations to make an array palindrome | 1822 |
969 | Merge Sort | 1821 |
970 | Dividing Array into Pairs With Sum Divisible by K | 1819 |
971 | Form minimum number from given sequence | 1817 |
972 | Group Shifted Strings Leetcode Solution | 1806 |
973 | Number of elements less than or equal to a given number in a given subarray | 1802 |
974 | Merge Sorted Array | 1801 |
975 | Longest Substring Without Repeating Characters Leetcode Solution | 1795 |
976 | Maximum difference between first and last indexes of an element in array | 1792 |
977 | Priority Queue | 1787 |
978 | Print modified array after multiple array range increment operations | 1784 |
979 | Count even length binary sequences with same sum of first and second half bits | 1780 |
980 | Cutting a Rod | 1771 |
981 | Form Minimum Number From Given Sequence | 1766 |
982 | Graph Cloning | 1763 |
983 | Find maximum average subarray of k length | 1755 |
984 | Swim in Rising Water LeetCode Solution | 1747 |
985 | Count Pairs Whose Products Exist in Array | 1744 |
986 | Minimum Moves to Equal Array Elements LeetCode Solution | 1737 |
987 | Excel Sheet Column Number LeetCode Solution | 1735 |
988 | Print Ancestors of a Given Binary Tree Node Without Recursion | 1732 |
989 | Unique Paths II | 1730 |
990 | Excel Sheet Column Title LeetCode Solution | 1719 |
991 | Binary Search Tree | 1719 |
992 | Guess The Word | 1719 |
993 | Longest Common Prefix using Character by Character Matching | 1719 |
994 | Kth Smallest Element in a BST | 1718 |
995 | Print all Possible Ways to Break a String in Bracket Form | 1718 |
996 | K Empty Slots | 1716 |
997 | Decrease Elements To Make Array Zigzag LeetCode Solution | 1715 |
998 | Palindrome Partitioning | 1712 |
999 | Regular Expression Matching | 1710 |
1000 | Check given array of size n can represent BST of n levels or not | 1708 |
1001 | Insert Delete GetRandom O(1) – Duplicates allowed LeetCode Solution | 1705 |
1002 | Minimum Possible Integer After at Most K Adjacent Swaps On Digits LeetCode Solution | 1705 |
1003 | Binary Search Tree Search and Insertion | 1694 |
1004 | How to print maximum number of A’s using given four keys | 1693 |
1005 | Sum of Left Leaves LeetCode Solution | 1676 |
1006 | Find postorder traversal of BST from preorder traversal | 1662 |
1007 | Sorted Array to Balanced BST | 1660 |
1008 | Maximum weight transformation of a given string | 1652 |
1009 | Queries for Number of Distinct Elements in a Subarray | 1634 |
1010 | Construct Complete Binary Tree from its Linked List Representation | 1628 |
1011 | Find the Town Judge LeetCode Solution | 1619 |
1012 | Maximum Depth Of Binary Tree | 1613 |
1013 | Symmetric Tree LeetCode Solution Leetcode Solution | 1606 |
1014 | Binary Tree to Binary Search Tree Conversion using STL set | 1604 |
1015 | Iterative method to find ancestors of a given binary tree | 1604 |
1016 | Shortest Unsorted Continuous Subarray LeetCode Solution | 1603 |
1017 | Random Pick Index LeetCode Solution | 1585 |
1018 | Search in Sorted Rotated Array | 1584 |
1019 | Data Structure Designing | 1582 |
1020 | Search an Element in Sorted Rotated Array | 1542 |
1021 | Find Maximum Depth of Nested Parenthesis in a String | 1542 |
1022 | Minimum Number of Operations to Move All Balls to Each Box LeetCode Solution | 1526 |
1023 | Convert a BST to a Binary Tree such that sum of all greater keys is added to every key | 1524 |
1024 | Kth Smallest Product of Two Sorted Arrays LeetCode Solution | 1505 |
1025 | Next Greater Element I Leetcode Solution | 1459 |
1026 | Maximum Binary Tree | 1455 |
1027 | Print Maximum Length Chain of Pairs | 1442 |
1028 | Flatten Binary Tree to Linked List LeetCode Solution | 1425 |
1029 | Find k-th smallest element in BST (Order Statistics in BST) | 1395 |
1030 | Peeking Iterator LeetCode Solution | 1389 |
1031 | Find Two Non-overlapping Sub-arrays Each With Target Sum LeetCode Solution | 1379 |