MAANG Interview Questions

Meta, Amazon, Apple, Netflix, and Google (MAANG) are some of the biggest tech companies in the world.

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.

To ace MAANG interviews, a well-defined preparation strategy is essential. And as the trendsetters of the high-tech world, it is crucial to have a sound knowledge of basic programming fundamentals. Recruiters at MAANG seek only the highly-skilled candidate.

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.

 

Top maang interview questions

S.NoInterview QuestionNumber of times asked
1Two Sum Leetcode Solution32554
2Maximum occurring character in a string17455
3Plus One Leetcode Solution16142
4Valid Parentheses LeetCode Solution15337
53Sum Leetcode Solution13003
6First Repeating Element12870
7Single Number Leetcode Solution11931
8Pow(x, n) Leetcode Solution11278
9Sqrt(x) Leetcode Solution10968
10Merge Sorted Arrays Leetcode Solution10689
11Meeting Rooms II LeetCode Solution10647
12Concatenation of Array LeetCode Solution10043
13Contains Duplicate II Leetcode Solution9746
14Roman to Integer Leetcode Solution9484
15Count Primes Leetcode Solutions9440
16Palindrome Number LeetCode Solution9331
17Search Insert Position Leetcode Solution9306
18Valid Palindrome Leetcode Solution9103
19Reverse Vowels of a String Leetcode Solution8972
20Jump Game Leetcode Solution8623
21Intersection of Two Arrays II Leetcode Solution8618
22Kids With the Greatest Number of Candies Leetcode Solution8450
23House Robber Leetcode Solution8377
24Spiral Matrix LeetCode Solution8350
25Text Justification LeetCode Solution8343
26Find the Maximum Repeating Number in Array8337
27Number of Good Pairs Leetcode Solution8294
28Add Binary Leetcode Solution8215
29Longest Substring Without Repeating Characters LeetCode Solution7850
30Longest Palindromic Substring LeetCode Solution7754
31Jewels and Stones Leetcode Solution7728
32Number Of 1 bits7724
33Power of Two Leetcode Solution7665
34Permutations Leetcode Solution7485
35Shuffle String Leetcode Solution7438
36Maximum Subarray Leetcode Solution7396
37Find All Numbers Disappeared in an Array Leetcode Solution7396
38Daily Temperatures Leetcode Solution7309
39Kth Missing Positive Number Leetcode Solution7217
40Maximum Profit in Job Scheduling Leetcode Solution7192
41Running Sum of 1d Array Leetcode Solution7175
42Min Stack Leetcode Solution7165
43Next Permutation Leetcode Solution7163
44Frog Jump Leetcode Solution7158
45Longest Common Prefix Leetcode Solution7092
46Number of Islands LeetCode Solution7006
47Third Maximum Number Leetcode Solution6970
48Move Zeroes LeetCode Solution6969
49Word Search Leetcode Solution6959
50Find Minimum Distance Between Two Numbers in an Array6958
51Rotate Image LeetCode Solution6787
52Combination Sum Leetcode Solution6740
53Bulb Switcher LeetCode Solution6731
54Next Greater Element I Leetcode Solution6676
55Shuffle the Array Leetcode Solution6634
56Median of Two Sorted Arrays LeetCode Solution6616
573Sum Closest LeetCode Solution6611
58Can Place Flowers LeetCode Solution6605
59Multiply Strings Leetcode Solution6547
60Search in Rotated Sorted Array Leetcode Solution6517
61House Robber II Leetcode Solution6515
62Reverse String Without Temporary Variable6515
63Remove Duplicates from Sorted Array Leetcode Solution6498
64Strobogrammatic Number LeetCode Solution6488
65Missing Number Leetcode Solution6440
66Count and Say Leetcode Solution6438
67Subarray and Subsequence6337
68Valid Anagram Leetcode Solution6316
69Excel Sheet Column Title Leetcode Solution6266
70Integer to Roman Leetcode Solution6264
71Count Pairs With Given Sum6219
72Koko Eating Bananas Leetcode Solution6136
73Product of array except self6081
74Isomorphic Strings Leetcode Solution6058
75Rotate String LeetCode Solution6057
76Evaluation of Postfix Expression6051
77String to Integer (atoi) LeetCode Solution6018
78Find the Difference Leetcode Solution5993
79Subtract the Product and Sum of Digits of an Integer Leetcode Solution5939
80Largest Number Leetcode Solution5834
81Majority Element Leetcode Solution5777
82Candy LeetCode Solution5765
83Set Matrix Zeroes5749
84Find Common Characters Leetcode Solution5724
85Happy Number Leetcode Solution5721
86Balanced Binary Tree Leetcode Solution5704
87How Many Numbers Are Smaller Than the Current Number Leetcode Solution5687
88Summary Ranges Leetcode Solution5624
89Smallest window in a string containing all characters of another string5573
90Is Subsequence Leetcode Solution5570
91Find the Town Judge Leetcode Solution5559
92Arranging Coins Leetcode Solution5543
93Word Pattern LeetCode Solution5525
94Sort Colors LeetCode Solution5470
95Unique Paths Leetcode Solution5469
96Rearrange Positive and Negative Numbers Alternatively in Array5456
97Subset Leetcode5394
98Asteroid Collision LeetCode Solution5301
99Repeated Substring Pattern LeetCode Solution5299
100String Compression LeetCode Solution5293
101Sort Characters By Frequency LeetCode Solution5288
102Linked List Cycle II LeetCode Solution5253
103Binary Search LeetCode Solution5247
104Sort Array By Parity LeetCode Solution5228
105Find the Winner of the Circular Game LeetCode Solution5216
106Find the Duplicate Number LeetCode Solution5202
107Reverse Integer Leetcode Solution5182
108Valid Palindrome II Leetcode Solution5160
109Sum of minimum and maximum elements of all subarrays of size k5114
110Product of Array Except Self LeetCode Solution5109
111Best Time to Buy and Sell Stock LeetCode Solution5095
112Zigzag Conversion LeetCode Solution5091
113Best Time to Buy and Sell Stock  II Leetcode Solution5067
114Bus Routes Leetcode Solution5033
115Divide Two Integers Leetcode Solution5032
116A Product Array Puzzle4999
117Rabin Karp Algorithm4978
118Employee Free Time LeetCode Solution4977
119First element occurring k times in an array4931
120Group Anagrams LeetCode Solution4924
121Merge Two Sorted Lists Leetcode Solutions4915
122Expression Evaluation4903
123Pascal Triangle Leetcode4874
124Minimum Cost For Tickets Leetcode Solution4853
125Build Array From Permutation Leetcode Solution4837
126Postfix to Infix Conversion4786
127Optimal Account Balancing LeetCode Solution4757
128Minimum Steps to reach target by a Knight4757
129Number of Provinces Leetcode Solution4749
130Kth largest element in an Array Leetcode Solutions4738
131Increasing Triplet Subsequence LeetCode Solution4733
132Page Replacement Algorithms in Operating Systems4705
133Matrix Chain Multiplication using Dynamic Programming4704
134Assign Cookies Leetcode Solution4692
135Implementation of Deque using Doubly Linked List4685
136H-Index Leetcode Solution4668
137Fibonacci Number LeetCode Solution4664
138Length of Last Word Leetcode Solution4659
139Decode String Leetcode Solution4635
140Robot Room Cleaner Leetcode Solution4617
141Defanging an IP Address Leetcode Solution4610
142First Unique Character in a String LeetCode Solution4553
143Convert array into Zig-Zag fashion4537
144Subarray with Given Sum4515
145Remove Duplicates from Sorted Array II Leetcode Solution4501
146Find Smallest Missing Number in a Sorted Array4484
147Generate Parentheses Leetcode Solution4465
148Subarray Product Less Than K LeetCode Solution4440
149Length of the largest subarray with contiguous elements4431
150Check if the Elements of an Array are Consecutive4425
151K-th Smallest Element in a Sorted Matrix4420
152Prefix to Infix Conversion4417
153Swap Nodes in Pairs Leetcode Solutions4416
154Guess Number Higher or Lower LeetCode Solution4404
155Pascal’s Triangle II Leetcode Solution4388
156Bellman Ford Algorithm4374
157Find First and Last Position of Element in Sorted Array Leetcode Solution4360
158Add Two Numbers II Leetcode Solution4356
159Reverse Words in a String III LeetCode Solution4334
160Find the Missing Number4333
161Coin Change 2 Leetcode Solution4330
162Last Stone Weight4317
163Island Perimeter Leetcode Solution4310
164Max Consecutive Ones Leetcode Solution4296
165Lemonade Change Leetcode Solution4283
166Form Minimum Number from Given Sequence of D’s and I’s4283
167Design Parking System Leetcode Solution4256
168Majority Element II Leetcode Solution4255
169Capacity To Ship Packages Within D Days Leetcode Solution4254
170First negative integer in every window of size k4244
171KMP Algorithm4241
172Remove Linked List Elements Leetcode Solution4210
173Combinations Leetcode Solution4210
174Find Pair with Given Difference4184
175Backspace String Compare4180
176String Compression4177
177Palindrome Linked List Leetcode Solution4165
178Trapping Rain Water Leetcode Solution4160
179Iterative Implementation of Quick Sort4160
180Find All Duplicates in an Array LeetCode Solution4151
181Remove Duplicates from Sorted List II LeetCode Solution4137
182OSI Model4137
183Delete middle element of a stack4127
184Repeated Substring Pattern4077
185Break a Palindrome LeetCode Solution4056
186Same Tree LeetCode Solution4047
187Word Ladder LeetCode Solution4037
188Remove All Occurrences of a Substring LeetCode Solution4036
189Slowest Key Leetcode Solution4036
190Monotonic Array LeetCode Solution4032
191Continuous Subarray Sum LeetCode Solution3971
192Merge Sorted Array LeetCode Solution3945
193Merge k Sorted Lists Leetcode Solution3943
19401 Matrix LeetCode Solution3943
195Subarray Sum Equals K LeetCode Solution3931
196Number of Dice Rolls With Target Sum LeetCode Solution3912
197Convert a Number to Hexadecimal Leetcode Solution3910
198Find Peak Element LeetCode Solution3905
199Rearrange given Array in Maximum Minimum Form3903
200Second Most Repeated Word in a Sequence3886
201The K Weakest Rows in a Matrix Leetcode Solution3877
202Delete Node in a Linked List Leetcode Solution3860
203Time Based Key-Value Store LeetCode Solution3858
204Find N Unique Integers Sum up to Zero Leetcode Solution3847
205Kth Largest Element in a Stream Leetcode Solution3840
206Printing brackets in Matrix Chain Multiplication Problem3839
207Moving Average from Data Stream Leetcode Solution3828
208Find the Row with Maximum Number of 1’s3817
209Target Sum3813
210Leetcode Permutations3811
211Combination Sum3807
212Find the Duplicate Element3801
213Insert Delete GetRandom O(1) Leetcode Solution3800
214Valid Perfect Square Leetcode Solution3793
215Subarray Sum Equals k3792
216Single Element in a Sorted Array LeetCode Solution3777
217Rotate List Leetcode Solution3759
218Maximum Product of Three Numbers LeetCode Solution3758
219Longest Common Subsequence LeetCode Solution3757
220Max Area of Island3743
221Check If Two String Arrays are Equivalent Leetcode Solution3742
222Generate all Binary Strings Without Consecutive 1’s3738
223Palindrome Number3735
224Top K Frequent Elements LeetCode Solution3732
225Reverse Only Letters LeetCode Solution3721
226Make The String Great Leetcode Solution3710
227Cuckoo sequence program3704
228Minimum Knight Moves LeetCode Solution3694
229Relative Ranks Leetcode Solution3694
230Find Leaders in an Array3677
231Find Triplet in Array With a Given Sum3671
232Relative Sort Array Leetcode Solution3669
233Number of Steps to Reduce a Number to Zero Leetcode Solution3668
234Prefix to Postfix Conversion3667
235Flipping an Image LeetCode Solution3651
236Scramble String3632
237Maximum Population Year LeetCode Solution3629
238Smallest Positive Number Missing in an Unsorted Array3624
239LRU Cache LeetCode Solution3618
240Letter Combinations of a Phone Number3614
241Unique Paths II Leetcode Solution3598
242Count Good Nodes in Binary Tree Leetcode Solution3596
243Permutation in String Leetcode Solution3595
244Check If N and Its Double Exist Leetcode Solution3579
245Stock Buy Sell to Maximize Profit3556
246Minimum swaps required to bring all elements less than or equal to k together3537
247Given two unsorted arrays find all pairs whose sum is x3534
248Maximum Subarray Sum using Divide and Conquer3534
249Search Suggestions System LeetCode Solution3530
250The kth Factor of n Leetcode Solution3526
251Minimum Operations to convert X to Y3526
252Remove Minimum Characters so that Two Strings Become Anagrams3526
253To Lower Case Leetcode Solution3509
254Top K Frequent Elements3505
255Sum of Subarray Ranges Leetcode Solution3477
256N-Queens LeetCode Solution3471
257Student Attendance Record I Leetcode Solution3464
258Maximize Distance to Closest Person LeetCode Solution3452
259Arithmetic Expression Evaluation3447
260Find the Number Occurring Odd Number of Times in an Array3443
261License Key Formatting Leetcode Solution3440
262Min Cost Climbing Stairs LeetCode Solution3436
263Top K Frequent Words LeetCode Solution3431
264Set Matrix Zeroes Leetcode Solution3431
265Remove Duplicates from Sorted List LeetCode Solution3418
266Maximum Sum Increasing Subsequence3402
267Reformat Date LeetCode Solution3399
268Arrange given Numbers to Form the Biggest Number II3338
269Next Permutation3336
270Most Frequent Element in an Array3322
271Design A Leaderboard Leetcode Solution3301
272Minimum Path Sum Leetcode Solution3300
273Pairs of Songs With Total Durations Divisible by 60 LeetCode Solution3291
274Stone Game LeetCode3288
275Reverse individual words3285
276Diagonal Traverse LeetCode Solution3278
277Prim’s Algorithm3272
278Construct Binary Tree from Given Inorder and Preorder Traversals3269
279Count of index pairs with equal elements in an array3266
280Find any one of the multiple repeating elements in read only array3266
281Minimum Characters to be Added at Front to Make String Palindrome3262
282Spiral Matrix II Leetcode Solution3250
283Sort Elements by Frequency of Occurrences3247
284Container With Most Water LeetCode Solution3240
285Implement a stack using single queue3238
286Intersection of Two Arrays3237
287Find if Path Exists in Graph Leetcode Solution3235
288Evaluate Division3231
289BFS for Disconnected Graph3228
290Diagonal Traversal LeetCode Solution3225
291Find Words That Can Be Formed by Characters Leetcode Solution3195
292Min Stack3188
293Maximum Depth of Binary Tree Leetcode Solution3179
294Special Array With X Elements Greater Than or Equal X Leetcode Solution3167
295Count Number of Occurrences in a Sorted Array3166
296Length of Longest valid Substring3159
297Invalid Transactions LeetCode Solution3154
298Reverse words in a string3153
299Best Time to Buy and Sell Stock III Leetcode Solution3146
300Least Number of Unique Integers after K Removals Leetcode Solution3143
301Minimum number of Merge Operations to make an Array Palindrome3143
302Robot Bounded In Circle LeetCode Solution3138
303House Robber3135
304Longest Common Subsequence3109
305Special Positions in a Binary Matrix Leetcode Solution3105
306Maximum Size Subarray Sum Equals k Leetcode Solution3103
307Find The Duplicate Number3096
308Symmetric Tree Leetcode Solution3085
309Brightest Position on Street LeetCode Solution3079
310Remove Nth Node From End of List Leetcode Solution3066
311Last Stone Weight II LeetCode Solution3062
312Binary Tree Zigzag Level Order Traversal LeetCode Solution3052
313The Celebrity Problem3046
314Single Number3038
315Find Leaves of Binary Tree LeetCode Solution3037
316Next Greater Element III LeetCode Solution3021
317Partition Labels LeetCode Solution3019
318Alien Dictionary LeetCode Solution3015
319Lowest Common Ancestor of a Binary Tree Leetcode Solution3012
320Shortest Word Distance Leetcode Solution3008
321One Edit Distance LeetCode Solution3004
322Invert Binary Tree LeetCode Solution3002
323Contains Duplicate LeetCode Solution3000
324Find the Closest Palindrome number2995
325Check whether Strings are K Distance Apart or Not2991
326Sudoku Solver2990
327Reveal Cards In Increasing Order Leetcode Solution2969
328N-th Tribonacci Number Leetcode Solution2966
329Binary Tree Inorder Traversal LeetCode Solution2964
330Range Sum Query 2D – Immutable Leetcode Solution2947
331Count of Triplets With Sum Less than Given Value2943
332Pair of Positive Negative Values in an Array2938
333Mobile Numeric Keypad Problem2928
334Find Duplicates in an Array in Most Efficient Way2928
335Next Permutation LeetCode Solution2924
336Regular Expression Matching Regular Expression Matching LeetCode Solution2924
337Jump Game2924
338Remove All Ones With Row and Column Flips Leetcode Solution2906
339Remove Invalid Parentheses Leetcode Solution2905
340Minimum operation to make all elements equal in array2902
341Clone Graph LeetCode Solution2896
342Sort Array By Parity II Leetcode Solution2895
343Find Index of Closing Bracket for a Given Opening Bracket in an Expression2894
344Painting Fence Algorithm2893
345Round Robin Scheduling2878
346Reverse Bits2866
347Largest Rectangle in Histogram LeetCode Solution2865
348Find Winner on a Tic Tac Toe Game Leetcode Solution2864
349Find the First and Second Smallest Elements2858
350Find Top K (or Most Frequent) Numbers in a Stream2850
351Partition Array Into Three Parts With Equal Sum Leetcode Solution2849
352Maximum Length of a Concatenated String with Unique Characters Leetcode Solution2848
353Combination Sum IV LeetCode Solution2847
354Rank Transform of an Array Leetcode Solution2838
355Tug of War2838
356Minimum Time Visiting All Points Leetcode Solution2835
357Merge Two Sorted Linked Lists2833
358Number of Smaller Elements on Right Side2817
359Maximal Square2811
360Find minimum difference between any two elements2810
361Find the subarray with least average2806
362Check if a given array contains duplicate elements within k distance from each other2804
363Minimum Moves to Equal Array Elements Leetcode Solution2800
364Longest subarray not having more than K distinct elements2799
365Longest subsequence such that difference between adjacents is one2795
366K Empty Slots LeetCode2789
367Unique Paths2788
368Range Sum of BST LeetCode Solution2787
369Sort a stack using a temporary stack2785
370Maximum Number of Occurrences of a Substring Leetcode Solution2780
371LRU Cache Leetcode Solution2779
372Path With Maximum Minimum Value LeetCode Solution2778
373Design Browser History LeetCode Solution2775
374Minimum Depth of Binary Tree Leetcode Solution2775
375LRU Cache Implementation2774
376Find the Smallest Divisor given a Threshold Leetcode Solution2772
377String Matching in an Array Leetcode Solution2767
378Reverse Nodes in k-Group LeetCode Solution2764
379Missing Element in Sorted Array LeetCode Solution2764
380Integer Break LeetCode Solution2761
381Bitwise AND of Numbers Range LeetCode Solution2752
382Longest Palindrome can be Formed by Removing or Rearranging Characters2752
383Sliding Window Technique2751
384Ugly Number II LeetCode Solution2750
385Best Time to Buy and Sell Stock with Cooldown Leetcode Solution2745
386Paint House LeetCode Solution2744
387Minimum Cost to Hire K Workers2744
388Smallest Subarray with k Distinct Numbers2743
389Longest Common Prefix using Trie2741
390Minimize Maximum Pair Sum in Array LeetCode Solution2740
391Maximum Circular Subarray Sum2740
392First Circular Tour to Visit all the Petrol Bunks2738
393Graph Valid Tree LeetCode Solution2735
394Common elements in all rows of a given matrix2735
395Permutation Sequence LeetCode Solution2732
396Find Maximum Level sum in Binary Tree2727
397Non-decreasing Array LeetCode Solution2720
398Find the Peak Element from an Array2716
399Consecutive Characters LeetCode Solution2713
400Insert Interval Leetcode Solution2712
401Split Linked List in Parts Leetcode Solution2692
402Hamming Distance Leetcode Solution2692
403Number of Closed Islands Leetcode Solution2689
404Minimum Time to Collect All Apples in a Tree LeetCode Solution2688
405K Closest Points to Origin Leetcode Solution2683
406Find duplicates in a given array when elements are not limited to a range2679
407Queries for counts of array elements with values in given range2679
408Number of Islands II LeetCode Solution2678
409Transpose Graph2676
410Minesweeper LeetCode Solution2672
411Given an Array of Pairs Find all Symmetric Pairs in it2672
412Invert Binary Tree LeetCode Solution2658
413Unique Paths III LeetCode Solution2647
414Minimum Number of Steps to Make Two Strings Anagram Leetcode Solutions2647
415Priority Queue using doubly linked list2646
416Stone Game II Leetcode2641
417Dijkstra Algorithm2641
418Sort elements by frequency2640
419Implementation of Deque using circular array2638
420Move All the Zeros to the End of the Given Array2637
421Max stack2625
422Maximum Consecutive Numbers Present in an Array2617
423Decompress Run-Length Encoded List Leetcode Solution2616
424Longest Common Prefix using Sorting2612
425Design a stack that supports getMin() in O(1) time and O(1) extra space2609
426Is Graph Bipartite? LeetCode Solution2601
427Snakes and Ladders LeetCode Solution2601
428Convert Sorted Array to Binary Search Tree LeetCode Solutions2598
429Stack Permutations (Check if an array is stack permutation of other)2597
430Binary Tree Maximum Path Sum LeetCode Solution2594
431Top View of Binary Tree2593
432Odd Even Linked List Leetcode Solution2592
433Expression Contains Redundant Bracket or Not2592
434Sorting array using Stacks2590
435Nth Catalan Number2588
436Count Submatrices With All Ones LeetCode Solution2584
437Partition List Leetcode Solution2583
438Replace Elements with Greatest Element on Right Side Leetcode Solution2576
439Word Search2570
440Kth Smallest Element in a BST Leetcode Solution2566
441Can Make Arithmetic Progression From Sequence Leetcode Solution2564
442Path Sum II LeetCode Solution2560
443Priority Queue in C++2559
444Reverse a linked list2555
445Restore IP Addresses Leetcode Solution2552
446Number of Days Between Two Dates LeetCode Solution2539
447Find a Peak Element II LeetCode Solution2536
448Integer to English words2533
449Validate Stack Sequences LeetCode Solution2528
450Kth Non-repeating Character2528
451Longest Increasing Path in a Matrix LeetCode Solution2527
452Vertical Order Traversal of Binary Tree LeetCode Solution2522
453How to Implement Stack Using Priority Queue or Heap?2522
454Find a Fixed Point in a Given Array2517
455Multiplication of Two Matrices2513
456Sequences of given length where every element is more than or equal to twice of previous2512
457Rearrange array such that even positioned are greater than odd2508
458Flood Fill LeetCode2507
459Cells with Odd Values in a Matrix LeetCode Solution2501
460Queries for GCD of all numbers of an array except elements in a given range2501
461Gold Mine Problem2501
462Toeplitz Matrix2501
463Palindrome Substring Queries2500
464Reorder Data in Log Files LeetCode Solution2499
465Find All Possible Recipes from Given Supplies LeetCode Solution2493
466Search a 2D Matrix II Leetcode Solution2492
467Maximum Subarray2487
468Number Complement Leetcode Solution2486
469Minimum Absolute Difference in BST Leetcode Solution2482
470Shortest Completing Word Leetcode Solution2478
471Recursion2477
472Search in a Binary Search Tree Leetcode Solution2475
473Distance of nearest cell having 1 in a binary matrix2472
474Majority Element2472
475Intersection of Two Linked Lists LeetCode Solution2469
476Detect a loop in the Linked List2463
477Minimum Path Sum2462
478Convert Sorted Array to Binary Search Tree Leetcode Solution2461
479Merge Two Binary Trees LeetCode Solution2452
480Find Median from Data Stream LeetCode Solution2447
481Minimum Number of Taps to Open to Water a Garden LeetCode Solution2447
482Best Time to Buy and Sell Stock2443
483Scramble String LeetCode Solution2438
484Find the Minimum Element in a Sorted and Rotated Array2425
485High Five LeetCode Solution2424
486The Stock Span Problem2424
487Design Hit Counter LeetCode Solution2422
488Guess Number Higher or Lower II2422
489Rearrange an array in order – smallest, largest, 2nd smallest, 2nd largest2422
490Trapping Rain Water LeetCode Solution2422
491Insert Node in the Sorted Linked List2420
492Largest rectangular sub-matrix whose sum is 02419
493Check If Array Pairs Are Divisible by k LeetCode Solution2418
494Race Car LeetCode Solution2417
495Balanced Expression with Replacement2416
496Generate all Binary Strings from Given Pattern2416
497The Maze III LeetCode Solution2413
498Shortest Palindrome2409
499Tiling Problem2408
500Kruskal Algorithm2403
501Longest Common Prefix using Divide and Conquer2399
502Implement Trie (Prefix Tree) Leetcode Solution2397
503Divide Chocolate LeetCode Solution2391
504Letter Case Permutation2386
505Pancake Sorting Problem2386
506Find Minimum in Rotated Sorted Array II LeetCode Solution2385
507Insert into a Binary Search Tree Leetcode Solution2385
508Camelcase Matching Leetcode Solution2383
509Largest Subarray with Equal Number of 0’s and 1’s2377
510Postfix to Prefix Conversion2376
511Print all Palindromic Partitions of a String2372
512Count subarrays having total distinct elements same as original array2368
513Evaluate Reverse Polish Notation LeetCode Solution2366
514Custom Sort String Leetcode Solution2366
515Convert BST to Min Heap2361
516Spiral Matrix III LeetCode Solution2359
517Check if Array Contains Contiguous Integers With Duplicates Allowed2359
518Palindrome Permutation LeetCode Solution2357
519Substring with Concatenation of All Words Leetcode Solution2349
520Count Possible Triangles2348
521Sort Colors2345
522Interval Tree2343
523Longest Substring with At Most K Distinct Characters LeetCode Solution2342
524LCS (Longest Common Subsequence) of three strings2340
525Find Pythagorean Triplets from Array2340
526Kth ancestor of a node in binary tree2338
527Analyze User Website Visit Pattern LeetCode Solution2331
528Merge Overlapping Intervals2331
529Sliding Window Maximum LeetCode Solution2330
530Check if Two given Strings are Isomorphic to each other2328
531Edit Distance LeetCode Solution2327
532Find the first Repeating Number in a Given Array2327
533Iterative Method to find Height of Binary Tree2325
534Sieve of Eratosthenes2324
535Determine Whether Matrix Can Be Obtained By Rotation LeetCode Solution2323
536Maximum Sum of Non Consecutive Elements2320
537Find a Sorted Subsequence of size 32310
538Longest Repeated Subsequence2307
5394Sum2307
540Sliding Window Median Leetcode Solution2306
541Minimum Bracket Reversals2304
542Sort an array according to the order defined by another array2303
543Minimum Jumps to Reach Home LeetCode Solution2301
544Best Time to Buy and Sell Stock with Transaction Fee Leetcode Solution2301
545Number of Subsequences That Satisfy the Given Sum Condition LeetCode solution2292
546Implement Two Stacks in an Array2292
547Maximum Length of Chain Pairs2292
548How to Create Mergable Stack?2290
549Fibonacci numbers2277
550Coin Change Problem2277
551Longest Substring with At Least K Repeating Characters LeetCode Solution2267
552Group Anagrams2263
553Maximum Number of Ways to Partition an Array LeetCode Solution2261
554Decode String2261
555Find maximum length Snake sequence2257
556Perfect Squares LeetCode Solution2256
557Path Crossing Leetcode Solution2247
558Different Ways to Add Parentheses Leetcode Solution2246
559Maximum Element in an Array which is Increasing and then Decreasing2244
560Number of Distinct Islands Leetcode Solution2243
561K-th Distinct Element in an Array2242
562Minimum Height Trees2241
563Rectangle Overlap LeetCode Solution2237
564Find the Lost Element From a Duplicated Array2236
565Sorted Linked List to Balanced BST2234
566N queen problem2233
567Decode Ways2231
568Champagne Tower LeetCode Solution2230
569Build an Array With Stack Operations Leetcode Solution2229
570Recover Binary Search Tree Leetcode Solution2223
571Shifting Letters LeetCode Solution2221
572Contains Duplicate2210
573Most Stones Removed with Same Row or Column LeetCode Solution2209
574Nearest Exit from Entrance in Maze LeetCode Solution2209
5753 Sum2205
576Jump Game IV LeetCode Solution2197
577Make Two Arrays Equal by Reversing Sub-arrays Leetcode Solution2191
578Possible Bipartition LeetCode Solution2189
579Find Largest Value in Each Tree Row LeetCode Solution2188
580Find the two Numbers with Odd Occurrences in an Unsorted Array2188
581Contiguous Array LeetCode Solution2183
582Find if an Expression has Duplicate Parenthesis or Not2182
583Monotonic Array Leetcode Solution2176
584Detect Capital Leetcode Solution2173
585Number of Equivalent Domino Pairs Leetcode Solution2170
586Queue based approach for first non-repeating character in a stream2168
587Fibonacci Number LeetCode Solution2166
588Subarrays with K Different Integers Leetcode Solution2163
589Valid Boomerang Leetcode Solution2162
590Design a Stack With Increment Operation Leetcode Solution2161
591Maximum Frequency Stack Leetcode Solution2159
592Subset sum problem2159
593Sort a stack using recursion2158
594Count items common to both the lists but with different prices2157
595Palindrome Partitioning Leetcode Solution2150
596Palindrome Permutations of a String2148
597First missing positive2147
598Merge Overlapping Intervals II2146
599Sliding Window Maximum2143
600Find the Town Judge LeetCode Solution2137
601Palindromic Substrings Leetcode Solution2137
602Merge Two Balanced Binary Search Trees2129
603Distance Between Bus Stops Leetcode Solution2119
604Reorder an Array According to the Given Indexes2114
605Sort a String According to Another String2113
606Best Meeting Point LeetCode Solution2112
607Minimum Height Trees LeetCode Solution2109
608Swapping Nodes in a Linked List Leetcode Solution2108
609Rearrange Spaces Between Words Leetcode Solution2107
610Number of palindromic paths in a matrix2105
611Word Break2099
612Find the Subarray of given length with Least Average2097
613Maximum Depth of N-ary Tree Leetcode Solution2096
614Maximum sum rectangle in a 2D matrix2096
615Maximum Product of Splitted Binary Tree LeetCode Solution2086
616Check if the given array can represent Level Order Traversal of Binary Search Tree2085
617Find Median from data Stream2074
618All Possible Full Binary Trees LeetCode Solution2073
619Merge K Sorted Arrays and Print Sorted Output2072
620Perform String Shifts Leetcode2071
621Maximum Score After Splitting a String Leetcode Solution2065
622Find First and Last Position of Element in Sorted Array LeetCode Solution2064
623Brick Wall LeetCode Solution2064
624Construction of Longest Increasing Subsequence (N log N)2054
625A Space Optimized DP solution for 0-1 Knapsack Problem2054
626Valid Parentheses Leetcode Solution2052
627Maximum Number of Chocolates to be Distributed Equally Among k Students2052
628Reach a Number LeetCode Solution2051
629Find the First Circular Tour that visits all the Petrol Pumps2039
630Maximize Elements Using Another Array2037
631Morris Traversal2035
632Caesar Cipher2035
633Pair with given product2033
634Palindrome Permutation2022
635Word Pattern2022
636My Calendar I LeetCode Solution2017
637Queue using Stacks2015
638Mean of Array After Removing Some Elements Leetcode Solution2014
639Smallest Good Base2012
640Split Array Into Consecutive Subsequences2012
641Recover Binary Search Tree2006
642Convert Sorted List to Binary Search Tree2006
643Implement strStr() LeetCode Solution2004
644Populating Next Right Pointers in Each Node Leetcode Solution2002
645Check if a Linked list of Strings form a Palindrome2001
646Binary Tree zigzag level order Traversal1999
647How to Efficiently Implement k Stacks in a Single Array?1997
648Find Zeros to be Flipped so that Number of Consecutive 1’s is Maximized1994
649Valid Sudoku1993
650Minimum Sum Path in a Triangle1992
651Find all pairs (a, b) in an array such that a % b = k1989
652Minimum number of jumps to reach end1989
653Web Crawler LeetCode Solution1984
654Count pair with Given Sum1977
655Construct BST from its given Level Order Traversal1975
656Check if String Follows Order of Characters by a Pattern or not1975
657Lowest Common Ancestor of a Binary Search Tree Leetcode Solution1970
658Largest Sum Contiguous Subarray1962
659Group Multiple Occurrence of Array Elements Ordered by first Occurrence1961
660Concatenation of Array LeetCode Solution1957
661Minimum Swaps to Group All 1’s Together Leetcode Solution1954
662Print Fibonacci sequence using 2 variables1951
663Remove brackets from an algebraic string containing + and – operators1950
664Find Maximum of Minimum for Every Window Size in a Given Array1950
665Length of Longest Fibonacci Subsequence1947
666Add two numbers1942
667Minimum time required to rot all oranges1941
668Arithmetic Slices II – Subsequence LeetCode Solution1938
669Print all subarrays with 0 sum1936
670Count ways to reach the nth stair using step 1, 2 or 31932
671Binary Tree Right Side View LeetCode Solution1931
672Find whether a subarray is in form of a mountain or not1931
673Design Skiplist LeetCode Solution1927
674Longest Subarray Having Count of 1s One More than Count of 0s1924
675Partition to K Equal Sum Subsets Leetcode Solution1922
676Best Time to Buy and Sell Stock IV LeetCode Solution1917
677Finding K closest element1907
678Count Sub Islands LeetCode Solution1906
679Level order Traversal in Spiral Form1904
680Range Sum Query 2D – Immutable LeetCode Solution1901
681Huffman Coding1898
682Sort 0s 1s and 2s in an Array1898
683Partition Problem1892
684Populating Next Right Pointers in Each Node1891
685Elements Appear more than N/K times in Array1891
686Segregate 0s and 1s in an Array1889
687Swap Kth Node from beginning with Kth Node from End1888
688Isomorphic Strings LeetCode Solution1882
689Shortest Path in a Grid with Obstacles Elimination LeetCode Solution1881
690Construct BST from given Preorder Traversal1880
691Count Distinct Elements in Every Window of Size K1877
692All Unique Triplets that Sum up to a Given Value1875
693Find four elements that sum to a given value (Hashmap)1875
694Validate Binary Search Tree1867
695Difference Array | Range update query in O(1)1865
696Nested List Weight Sum II LeetCode Solution1862
697Remove Palindromic Subsequences Leetcode Solution1859
698Bubble sort using two Stacks1851
699Rearrange Array such that arr[i] >= arr[j] if i is even and arr[i] <= arr[j] if i is odd and j < i1850
700Find all triplets with zero sum1848
701Heap Sort1847
702Find All Pairs With a Given Difference1845
703Maximize Sum of Array after K Negations Leetcode Solution1844
704Check for Balanced Parentheses in an Expression1844
705Counting Bits1844
706Rearrange an Array Such that arr[i] is equal to i1841
707Reorder Array Using Given Indexes1828
708Maximum difference between two elements such as larger element comes after smaller1822
709MiniMax Algorithm1821
710Check if Two Expressions With Brackets are Same1816
711Maximum Distance in Array1815
712Minimum Distance Between BST Nodes Leetcode Solution1806
713Maximum Product Subarray II1804
714Binary Tree to Binary Search Tree Conversion1803
715Check if any two intervals overlap among a given set of intervals1802
716Find Duplicate Subtrees1802
717Increasing Subsequence of Length three with Maximum Product1802
718Root to Leaf path with target sum Leetcode Solutions1801
719Count Minimum Steps to Get the given Array1799
720Linked List Cycle1798
721Contiguous Array Leetcode1798
722Merge K Sorted Linked Lists1794
723String comparison containing wildcards1789
724Flatten 2D Vector LeetCode Solution1785
725Longest Increasing Subsequence1784
726Parallel Courses II LeetCode Solution1776
727Happy Number1770
728Merge Two Sorted Lists Leetcode1769
729Inorder Successor of a node in Binary Tree1767
730Container with Most Water1764
731An Interesting Method to generate Binary Numbers from 1 to n1763
732K maximum sums of overlapping contiguous sub-arrays1763
733Alien Dictionary1761
734Symmetric Tree1760
735Queue Reconstruction by Height1751
736Reverse Nodes in K-Group1751
737Longest Common Prefix Using Binary Search II1748
738Sum Root to Leaf Numbers LeetCode Solution1746
739Smallest Range II Leetcode Solution1736
740Delete Nodes and Return Forest Leetcode Solution1732
741Minimum Swaps to Make Strings Equal Leetcode Solution1731
742Delete Nth node from the end of the given linked list1730
743Queries on Probability of Even or Odd Number in given Ranges1729
744Rotate Array1727
745Find pairs with given sum such that elements of pair are in different rows1726
746Minimum Cost to Move Chips to The Same Position LeetCode Solution1725
747Find the first repeating element in an array of integers1725
748Score of Parenthesis LeetCode Solution1723
749Kill Process LeetCode Solution1721
750Count Good Nodes in Binary Tree LeetCode Solution1716
751Union and Intersection of two Linked Lists1714
752Print a Binary Tree in Vertical Order1713
753Merging Intervals1711
754Find subarray with given sum (Handles Negative Numbers)1706
755Longest Common Prefix Word by Word Matching1702
756Iterative Depth First Traversal of Graph1700
757Climbing stairs1698
758Peak Index in a Mountain Array LeetCode Solution1697
759Check if a queue can be sorted into another queue using a stack1694
760New 21 Game1691
761Count pairs from two linked lists whose sum is equal to a given value1686
762Construct Binary Tree from Preorder and Postorder Traversal LeetCode Solution1682
763Breadth First Search (BFS) for a Graph1678
764Maximum size subarray sum equals k1671
765Substring With Concatenation Of All Words1667
766Valid Parenthesis String1662
767Sort Array by Increasing Frequency Leetcode Solution1656
768Find the Difference Leetcode Solution1656
769Find K Closest Elements LeetCode Solution1655
770Sorting a K Sorted Array1654
771Range LCM Queries1649
772Minimum Size Subarray Sum1647
773Vertical sum in a given binary tree1645
774Find Maximum Sum Possible Equal Sum of Three Stacks1644
775Iterative Preorder Traversal1642
776Matrix Chain Multiplication1641
777Verify Preorder Serialization of a Binary Tree1641
778Friends Of Appropriate Ages LeetCode Solution1640
779Construct Binary Tree from given Parent Array representation1639
780Find Sum of all unique sub-array sum for a given array1634
781Remove duplicates from sorted array1632
782Find K Length Subarray of Maximum Average1629
783Reservoir Sampling1619
784Flatten Binary Tree to Linked List LeetCode Solution1610
785Check if a given array can represent Preorder Traversal of Binary Search Tree1608
786Given a binary tree, how do you remove all the half nodes?1606
787Remove Duplicates from Sorted List II1606
788Defanging an IP Address LeetCode Solution1605
789Find the largest multiple of 31605
790Maximum Product Subarray1604
791Unique Binary Search Trees1603
792Sum of f(a[i], a[j]) over all pairs in an array of n integers1601
793Number of siblings of a given Node in n-ary Tree1600
794Find Three Element From Different Three Arrays Such That a + b + c = sum1600
795Employee Importance LeetCode Solution1596
796Boolean Parenthesization Problem1595
797Minimum Number of Arrows to Burst Balloons LeetCode Solution1590
798Filter Restaurants by Vegan-Friendly, Price and Distance Leetcode Solution1590
799Boundary Traversal of binary tree1590
800The Painter’s Partition Problem1589
801Median of Two Sorted Arrays1589
802Non-overlapping sum of two sets1588
803Print All Distinct Elements of a Given Integer Array1586
804Valid Anagrams1584
805Closest Leaf in a Binary Tree LeetCode Solution1582
806Tree Traversal (Preorder, Inorder & Postorder)1578
807Check Completeness of a Binary Tree LeetCode Solution1577
808Print all triplets in sorted array that form AP1572
809Find Peak Element1569
810Partition Equal Subset Sum1567
811Distinct Subsequences1564
812Bold Words in String LeetCode Solution1559
813Products of ranges in an array1559
814Infix to Postfix1559
815Level of Each node in a Tree from source node1558
816Subset Sum Problem in O(sum) space1555
817Serialize and Deserialize Binary Tree LeetCode Solution1553
818Find Element Using Binary Search in Sorted Array1551
819Largest BST Subtree LeetCode Solution1550
820Count and Say1548
821Third Maximum Number Leetcode Solution1547
822Maximum subsequence sum such that no three are consecutive1547
823Find distance between two nodes of a Binary Tree1547
824Longest Palindromic Subsequence1538
825Count number of triplets with product equal to given number1535
826Create Maximum Number1533
827Largest divisible pairs subset1531
828Level order traversal using two Queues1528
829Find Nth Node1527
830Deletion in a Binary Tree1526
831Missing Number1526
832Hamming Distance1522
833Super Ugly Number1516
834Unique Binary Search Trees LeetCode Solution1513
835Minimum Remove to Make Valid Parentheses LeetCode Solution1511
836Find Common Characters Leetcode Solution1511
837Four Elements that Sum to Given1511
838Array Nesting Leetcode Solution1508
839Palindrome Partitioning1507
840Pancake Sorting1503
841Largest Submatrix With Rearrangements LeetCode Solution1500
842Kth Smallest Element in a Sorted Matrix LeetCode Solution1498
843Valid Number1497
844Valid Triangle Number LeetCode Solution1496
845Isomorphic Strings1494
846Next Greater Element II LeetCode Solution1493
847Transform a BST to Greater sum Tree1490
848Compare Strings by Frequency of the Smallest Character Leetcode Solution1483
849Binary array after M range toggle operations1483
850Binary Tree Longest Consecutive Sequence LeetCode Solution1481
851Sort Elements by Frequency II1481
852Lowest Common Ancestor1477
853BFS vs DFS for Binary Tree1475
854Maximum number of segments of lengths a, b and c1473
855Shuffle an Array1470
856Averages of Levels in Binary Tree1470
857Check if two nodes are on the same path in a Tree1467
858Insert Delete GetRandom1465
859Find Smallest Range Containing Elements from k Lists1463
860Number Of Longest Increasing Subsequence1462
861Next Greater Element in an Array1461
862Trapping Rain Water II LeetCode Solution1459
863Sentence Screen Fitting LeetCode Solution1459
864Minimum insertions to form a palindrome with permutations allowed1458
865Newman-Conway Sequence1458
866Maximum Sum of 3 Non-Overlapping Subarrays1454
867Integer to Roman1454
868Maximum Population Year LeetCode Solution1453
869Largest subarray with equal number of 0s and 1s1448
870Valid Triangle Number LeetCode Solution1446
871Path Sum1445
872Merge Two Sorted Arrays1445
873Closest Binary Search Tree Value Leetcode Solution1444
874Encoded String With Shortest Length LeetCode Solution1441
875Minimum sum of squares of character counts in a given string after removing k characters1439
876Height of a generic tree from parent array1432
877Maximum Side Length of a Square with Sum Less than or Equal to Threshold LeetCode Solution1430
878Kth Smallest Number in Multiplication Table Leetcode Solution1429
879Balanced Binary Tree1429
880Stone Game IV LeetCode Solution1428
881Stone Game IV LeetCode Solution1426
882Find minimum number of merge operations to make an array palindrome1426
883Permutations of a Given String Using STL1426
884Topological Sorting1425
885Diameter of N-Ary Tree LeetCode Solution1418
886Range Minimum Query (Square Root Decomposition and Sparse Table)1410
887Count Primes in Ranges1409
888First Bad Version1406
889Reorganize String1403
890Contiguous Array1399
891Merging Two Sorted Arrays1397
892Maximum difference between first and last indexes of an element in array1396
893Red-Black Tree Introduction1394
894Arrange given numbers to form the biggest number1394
895Iterative Postorder Traversal Using Two Stacks1389
896Find Minimum In Rotated Sorted Array1389
897Find Largest d in Array such that a + b + c = d1387
898Print Right View of a Binary Tree1386
899Rearrange an array such that ‘arr[j]’ becomes ‘i’ if ‘arr[i]’ is ‘j’1385
900Orderly Queue LeetCode Solution1374
901Minimum Swaps To Make Sequences Increasing LeetCode Solution1374
902Find unique character in a string1374
903Check if all levels of two Binary Tree are anagrams or not1372
904Friends Pairing Problem1368
905Total Hamming Distance LeetCode Solution1364
906Diagonal Traversal of Binary Tree1363
907Longest Bitonic Subsequence1363
908Lower Case To Upper Case1363
909Binary Search Tree Delete Operation1362
910Largest Plus Sign Leetcode Solution1359
911Valid Perfect Square LeetCode Solution1359
912Swap Nodes In Pairs1359
913Reverse a Path in BST using Queue1358
914Count the Pairs at Same Distance as in English Alphabets1358
915Bottom View of a Binary Tree1357
916Serialize and Deserialize Binary Tree1356
917Next greater element1353
918Binary Search Tree Search and Insertion1349
919Koko Eating Bananas LeetCode Solution1347
920Level Order Traversal of Binary Tree1345
921Best Meeting Point LeetCode Solution1340
922Step-By-Step Directions From a Binary Tree Node to Another LeetCode Solution1337
923Maximum Product Subarray1332
924Range Sum Query using Sparse Table1325
925Valid Tic-Tac-Toe State LeetCode Solution1323
926Longest Substring Without Repeating Characters Leetcode Solution1320
927Maximum Product Subarray1320
928Advantages of BST over Hash Table1319
929Edit Distance1309
930The Number of Weak Characters in the Game LeetCode Solution1305
931Convert BST into a Min-Heap without using array1304
932Maximum difference between frequency of two elements such that element having greater frequency is also greater1303
933A program to check if a binary tree is BST or not1298
934Segment Tree1298
935Shuffle a given Array1296
936Find the smallest binary digit multiple of given number1295
937Greatest Sum Divisible by Three LeetCode Solution1292
938Maximum Sum Increasing Subsequence1290
939Construct Complete Binary Tree from its Linked List Representation1288
940Group Shifted Strings Leetcode Solution1277
941Array Queries for multiply replacements and product1277
942Longest Increasing Consecutive Subsequence1277
943Priority Queue1277
944Dividing Array into Pairs With Sum Divisible by K1276
945Write a function to get the intersection point of two Linked Lists1274
946K’th Largest element in BST using constant extra space1271
947Sorted Array to Balanced BST1271
948Image Overlap LeetCode Solution1269
949Design Add and Search Words Data Structure LeetCode Solution1268
950Constant time range add operation on an array1268
951Design Underground System Leetcode Solution1266
952Find postorder traversal of BST from preorder traversal1258
953Collect maximum points in a grid using two traversals1254
954Print Next Greater Number of Q queries1254
955Range Queries for Longest Correct Bracket Subsequence1253
956Find the node with minimum value in a Binary Search Tree1245
957Print n terms of Newman-Conway Sequence1244
958Insert into a Sorted Circular Linked List LeetCode Solution1242
959Swim in Rising Water LeetCode Solution1238
960Guess The Word1238
961Check if an Array is Stack Sortable1236
962Excel Sheet Column Number LeetCode Solution1234
963Power of Two1233
964Factorial Trailing Zeroes LeetCode Solution1228
965Queries on XOR of greatest odd divisor of the range1228
966Queries for Number of Distinct Elements in a Subarray1227
967Clone a Binary Tree with Random Pointers1223
968Form Minimum Number From Given Sequence1222
969Print modified array after multiple array range increment operations1221
970Lowest Common Ancestor in Binary Search Tree1220
971Numbers with prime frequencies greater than or equal to k1215
972Maximum Array from Two given Arrays Keeping Order Same1213
973K’th Largest Element in BST when modification to BST is not allowed1212
974Merge Sort1208
975Longest Common Prefix using Character by Character Matching1207
976Search in Sorted Rotated Array1201
977Find Maximum Depth of Nested Parenthesis in a String1197
978Print all Possible Ways to Break a String in Bracket Form1197
979Moving Stones Until Consecutive Leetcode Solution1195
980Form minimum number from given sequence1192
981K Empty Slots1191
982Count and Toggle Queries on a Binary Array1188
983Merge Sorted Array1188
984Kth Smallest Product of Two Sorted Arrays LeetCode Solution1186
985Decrease Elements To Make Array Zigzag LeetCode Solution1182
986Cutting a Rod1175
987Check for Palindrome after every character replacement Query1174
988Minimum Possible Integer After at Most K Adjacent Swaps On Digits LeetCode Solution1172
989Check if each internal node of a BST has exactly one child1168
990Write Code to Determine if Two Trees are Identical1161
991Number of elements less than or equal to a given number in a given subarray1161
992Binary Search Tree1157
993Number of Orders in the Backlog Leetcode Solution1156
994Count even length binary sequences with same sum of first and second half bits1153
995Check if X can give change to every person in the Queue1148
996Queries for Decimal Values of Subarrays of a Binary Array1143
997Closest Binary Search Tree Value II LeetCode Solution1136
998Minimum Moves to Equal Array Elements LeetCode Solution1133
999Unique Paths II1130
1000Insert Delete GetRandom O(1) – Duplicates allowed LeetCode Solution1125
1001Merge two BSTs with limited extra space1125
1002Find maximum average subarray of k length1122
1003Symmetric Tree LeetCode Solution Leetcode Solution1118
1004Regular Expression Matching1114
1005Shortest Unsorted Continuous Subarray LeetCode Solution1108
1006Count Pairs Whose Products Exist in Array1107
1007How to print maximum number of A’s using given four keys1103
1008Maximum weight transformation of a given string1102
1009Random Pick Index LeetCode Solution1090
1010Graph Cloning1087
1011Print Ancestors of a Given Binary Tree Node Without Recursion1081
1012Kth Smallest Element in a BST1080
1013Sum of Left Leaves LeetCode Solution1075
1014Maximum Depth Of Binary Tree1066
1015Excel Sheet Column Title LeetCode Solution1064
1016Search an Element in Sorted Rotated Array1048
1017Check given array of size n can represent BST of n levels or not1043
1018Minimum Number of Operations to Move All Balls to Each Box LeetCode Solution1041
1019Next Greater Element I Leetcode Solution1025
1020Convert a BST to a Binary Tree such that sum of all greater keys is added to every key1025
1021Palindrome Partitioning1025
1022Maximum Binary Tree1018
1023Iterative method to find ancestors of a given binary tree1013
1024Find k-th smallest element in BST (Order Statistics in BST)1008
1025Data Structure Designing994
1026Find the Town Judge LeetCode Solution967
1027Binary Tree to Binary Search Tree Conversion using STL set964
1028Peeking Iterator LeetCode Solution926
1029Print Maximum Length Chain of Pairs924
1030Find Two Non-overlapping Sub-arrays Each With Target Sum LeetCode Solution898
1031Flatten Binary Tree to Linked List LeetCode Solution895
Translate »