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 Solution43838
2Maximum occurring character in a string19904
3Plus One Leetcode Solution19615
4Valid Parentheses LeetCode Solution19404
53Sum Leetcode Solution17703
6Merge Sorted Arrays Leetcode Solution15543
7First Repeating Element15368
8Single Number Leetcode Solution15059
9Count Primes Leetcode Solutions14853
10Pow(x, n) Leetcode Solution14760
11Sqrt(x) Leetcode Solution14552
12Meeting Rooms II LeetCode Solution13573
13Concatenation of Array LeetCode Solution13037
14Roman to Integer Leetcode Solution12167
15Valid Palindrome Leetcode Solution12002
16Search Insert Position Leetcode Solution11918
17Contains Duplicate II Leetcode Solution11904
18Palindrome Number LeetCode Solution11750
19Remove Duplicates from Sorted Array Leetcode Solution11599
20Jump Game Leetcode Solution11333
21Reverse Vowels of a String Leetcode Solution11290
22Longest Substring Without Repeating Characters LeetCode Solution11270
23Number of Good Pairs Leetcode Solution11268
24Intersection of Two Arrays II Leetcode Solution11228
25Spiral Matrix LeetCode Solution10995
26House Robber Leetcode Solution10933
27Kids With the Greatest Number of Candies Leetcode Solution10909
28Add Binary Leetcode Solution10790
29Maximum Subarray Leetcode Solution10456
30Number Of 1 bits10381
31Find the Maximum Repeating Number in Array10174
32Text Justification LeetCode Solution10089
33Move Zeroes LeetCode Solution9969
34Jewels and Stones Leetcode Solution9941
35Min Stack Leetcode Solution9927
36Power of Two Leetcode Solution9690
37Longest Palindromic Substring LeetCode Solution9678
38Permutations Leetcode Solution9647
39Shuffle String Leetcode Solution9639
40Word Search Leetcode Solution9549
41Third Maximum Number Leetcode Solution9484
42Daily Temperatures Leetcode Solution9475
43Evaluation of Postfix Expression9452
44Find All Numbers Disappeared in an Array Leetcode Solution9435
45Median of Two Sorted Arrays LeetCode Solution9408
46Next Permutation Leetcode Solution9337
47Search in Rotated Sorted Array Leetcode Solution9325
48Number of Islands LeetCode Solution9213
49Kth Missing Positive Number Leetcode Solution9199
50Maximum Profit in Job Scheduling Leetcode Solution9192
51Next Greater Element I Leetcode Solution9118
52Longest Common Prefix Leetcode Solution9069
53Frog Jump Leetcode Solution8919
54Valid Anagram Leetcode Solution8867
55Running Sum of 1d Array Leetcode Solution8784
56Find Minimum Distance Between Two Numbers in an Array8770
57Shuffle the Array Leetcode Solution8753
58Rotate Image LeetCode Solution8695
59Combination Sum Leetcode Solution8655
60Multiply Strings Leetcode Solution8652
61Can Place Flowers LeetCode Solution8645
62House Robber II Leetcode Solution8582
63Count and Say Leetcode Solution8565
643Sum Closest LeetCode Solution8496
65Bulb Switcher LeetCode Solution8448
66Boolean Parenthesization Problem8427
67Koko Eating Bananas Leetcode Solution8360
68Best Time to Buy and Sell Stock LeetCode Solution8335
69Subarray and Subsequence8269
70Excel Sheet Column Title Leetcode Solution8259
71Happy Number Leetcode Solution8248
72Isomorphic Strings Leetcode Solution8203
73Majority Element Leetcode Solution8181
74Candy LeetCode Solution8168
75Missing Number Leetcode Solution8141
76Count Pairs With Given Sum8115
77Integer to Roman Leetcode Solution8112
78Product of array except self8018
79A Product Array Puzzle8012
80Rotate String LeetCode Solution7986
81Strobogrammatic Number LeetCode Solution7955
82Binary Search LeetCode Solution7894
83Reverse String Without Temporary Variable7857
84Is Subsequence Leetcode Solution7844
85Find the Difference Leetcode Solution7818
86Find the Duplicate Number LeetCode Solution7806
87Expression Evaluation7795
88Largest Number Leetcode Solution7786
89Find Common Characters Leetcode Solution7767
90Subtract the Product and Sum of Digits of an Integer Leetcode Solution7643
91String to Integer (atoi) LeetCode Solution7616
92Subset Leetcode7607
93Rabin Karp Algorithm7573
94How Many Numbers Are Smaller Than the Current Number Leetcode Solution7566
95Summary Ranges Leetcode Solution7502
96Set Matrix Zeroes7482
97Balanced Binary Tree Leetcode Solution7439
98Word Pattern LeetCode Solution7405
99Sort Characters By Frequency LeetCode Solution7387
100Find the Town Judge Leetcode Solution7383
101Find the Winner of the Circular Game LeetCode Solution7346
102Unique Paths Leetcode Solution7329
103Arranging Coins Leetcode Solution7322
104Rearrange Positive and Negative Numbers Alternatively in Array7281
105Group Anagrams LeetCode Solution7246
106Postfix to Infix Conversion7243
107String Compression LeetCode Solution7173
108Asteroid Collision LeetCode Solution7141
109Page Replacement Algorithms in Operating Systems7101
110Repeated Substring Pattern LeetCode Solution7063
111Smallest window in a string containing all characters of another string7038
112Best Time to Buy and Sell Stock  II Leetcode Solution6986
113Matrix Chain Multiplication using Dynamic Programming6985
114Sort Colors LeetCode Solution6984
115Sum of minimum and maximum elements of all subarrays of size k6849
116Sort Array By Parity LeetCode Solution6846
117Zigzag Conversion LeetCode Solution6827
118Kth largest element in an Array Leetcode Solutions6812
119Valid Palindrome II Leetcode Solution6803
120Generate Parentheses Leetcode Solution6765
121Divide Two Integers Leetcode Solution6764
122Find the Row with Maximum Number of 1’s6727
123Assign Cookies Leetcode Solution6725
124Decode String Leetcode Solution6711
125Pascal Triangle Leetcode6710
126Product of Array Except Self LeetCode Solution6647
127Reverse Integer Leetcode Solution6635
128Remove Duplicates from Sorted Array II Leetcode Solution6630
129H-Index Leetcode Solution6621
130Length of Last Word Leetcode Solution6613
131Bus Routes Leetcode Solution6563
132Number of Provinces Leetcode Solution6535
133Merge Two Sorted Lists Leetcode Solutions6518
134Prefix to Infix Conversion6515
135Linked List Cycle II LeetCode Solution6471
136Convert array into Zig-Zag fashion6445
137Minimum Steps to reach target by a Knight6445
138Minimum Cost For Tickets Leetcode Solution6426
139Employee Free Time LeetCode Solution6418
140Optimal Account Balancing LeetCode Solution6415
141Defanging an IP Address Leetcode Solution6404
142Pascal’s Triangle II Leetcode Solution6358
143Find First and Last Position of Element in Sorted Array Leetcode Solution6329
144Island Perimeter Leetcode Solution6284
145Bellman Ford Algorithm6279
146Implementation of Deque using Doubly Linked List6273
147OSI Model6238
148First element occurring k times in an array6237
149Increasing Triplet Subsequence LeetCode Solution6228
150Merge Sorted Array LeetCode Solution6227
151Majority Element II Leetcode Solution6203
152Build Array From Permutation Leetcode Solution6197
153KMP Algorithm6183
154Robot Room Cleaner Leetcode Solution6175
155Max Consecutive Ones Leetcode Solution6140
156Guess Number Higher or Lower LeetCode Solution6134
157Find Pair with Given Difference6108
158Check if the Elements of an Array are Consecutive6106
159K-th Smallest Element in a Sorted Matrix6085
160Swap Nodes in Pairs Leetcode Solutions6076
161Add Two Numbers II Leetcode Solution6054
162Set Matrix Zeroes Leetcode Solution6051
163Find the Missing Number6047
164Lemonade Change Leetcode Solution6029
165First negative integer in every window of size k5982
166Trapping Rain Water Leetcode Solution5979
167Design Parking System Leetcode Solution5974
168Fibonacci Number LeetCode Solution5966
169Subarray Sum Equals K LeetCode Solution5945
170Delete middle element of a stack5930
171First Unique Character in a String LeetCode Solution5897
172Word Ladder LeetCode Solution5893
173Last Stone Weight5889
174Coin Change 2 Leetcode Solution5880
175Subarray with Given Sum5869
176Length of the largest subarray with contiguous elements5862
177Monotonic Array LeetCode Solution5860
178Capacity To Ship Packages Within D Days Leetcode Solution5851
179String Compression5850
180Find All Duplicates in an Array LeetCode Solution5847
181Subarray Product Less Than K LeetCode Solution5832
182Form Minimum Number from Given Sequence of D’s and I’s5823
183Repeated Substring Pattern5816
184Palindrome Linked List Leetcode Solution5801
185Single Element in a Sorted Array LeetCode Solution5794
186Find Smallest Missing Number in a Sorted Array5761
187Leetcode Permutations5710
188Continuous Subarray Sum LeetCode Solution5695
189Remove Duplicates from Sorted List II LeetCode Solution5677
19001 Matrix LeetCode Solution5677
191Prefix to Postfix Conversion5664
192Combinations Leetcode Solution5663
193Combination Sum5623
194Reverse Words in a String III LeetCode Solution5601
195Break a Palindrome LeetCode Solution5598
196Iterative Implementation of Quick Sort5589
197Valid Perfect Square Leetcode Solution5587
198Remove Linked List Elements Leetcode Solution5582
199Same Tree LeetCode Solution5577
200Insert Delete GetRandom O(1) Leetcode Solution5541
201Merge k Sorted Lists Leetcode Solution5526
202Rotate List Leetcode Solution5520
203Contains Duplicate LeetCode Solution5514
204Container With Most Water LeetCode Solution5511
205Relative Ranks Leetcode Solution5509
206Top K Frequent Elements LeetCode Solution5504
207Slowest Key Leetcode Solution5498
208Backspace String Compare5472
209Find Peak Element LeetCode Solution5454
210Cuckoo sequence program5449
211Maximum Product of Three Numbers LeetCode Solution5434
212Palindrome Number5380
213Subarray Sum Equals k5379
214Find the Duplicate Element5369
215Printing brackets in Matrix Chain Multiplication Problem5359
216Kth Largest Element in a Stream Leetcode Solution5346
217The K Weakest Rows in a Matrix Leetcode Solution5346
218Longest Common Subsequence LeetCode Solution5327
219Max Area of Island5293
220Second Most Repeated Word in a Sequence5283
221Find Leaders in an Array5279
222Remove All Occurrences of a Substring LeetCode Solution5269
223Rearrange given Array in Maximum Minimum Form5255
224Generate all Binary Strings Without Consecutive 1’s5252
225Relative Sort Array Leetcode Solution5249
226Scramble String5245
227Unique Paths II Leetcode Solution5238
228Check If Two String Arrays are Equivalent Leetcode Solution5237
229Permutation in String Leetcode Solution5225
230Convert a Number to Hexadecimal Leetcode Solution5221
231Arithmetic Expression Evaluation5217
232Target Sum5215
233Make The String Great Leetcode Solution5211
234Find Triplet in Array With a Given Sum5193
235Delete Node in a Linked List Leetcode Solution5188
236Letter Combinations of a Phone Number5174
237Count Good Nodes in Binary Tree Leetcode Solution5160
238N-Queens LeetCode Solution5156
239Time Based Key-Value Store LeetCode Solution5151
240Moving Average from Data Stream Leetcode Solution5143
241Construct Binary Tree from Given Inorder and Preorder Traversals5138
242Stone Game LeetCode5132
243Next Permutation5105
244LRU Cache LeetCode Solution5093
245Prim’s Algorithm5090
246Minimum Operations to convert X to Y5080
247Number of Dice Rolls With Target Sum LeetCode Solution5077
248Find N Unique Integers Sum up to Zero Leetcode Solution5075
249Check If N and Its Double Exist Leetcode Solution5053
250Remove Minimum Characters so that Two Strings Become Anagrams5024
251Min Stack5022
252Number of Steps to Reduce a Number to Zero Leetcode Solution5016
253Given two unsorted arrays find all pairs whose sum is x5016
254Flipping an Image LeetCode Solution4976
255Find The Duplicate Number4961
256Top K Frequent Elements4948
257Minimum Knight Moves LeetCode Solution4947
258Minimum swaps required to bring all elements less than or equal to k together4946
259Stock Buy Sell to Maximize Profit4938
260Min Cost Climbing Stairs LeetCode Solution4927
261Reverse Only Letters LeetCode Solution4914
262Student Attendance Record I Leetcode Solution4910
263Smallest Positive Number Missing in an Unsorted Array4900
264To Lower Case Leetcode Solution4875
265Maximum Sum Increasing Subsequence4870
266Single Number4860
267License Key Formatting Leetcode Solution4859
268The kth Factor of n Leetcode Solution4838
269Reverse words in a string4834
270Maximum Subarray Sum using Divide and Conquer4829
271Maximum Population Year LeetCode Solution4776
272Top K Frequent Words LeetCode Solution4742
273Longest Common Subsequence4737
274Sudoku Solver4733
275Find the Number Occurring Odd Number of Times in an Array4719
276BFS for Disconnected Graph4708
277Remove Nth Node From End of List Leetcode Solution4698
278Find Words That Can Be Formed by Characters Leetcode Solution4693
279Search Suggestions System LeetCode Solution4691
280Minimum Path Sum Leetcode Solution4688
281Reformat Date LeetCode Solution4685
282Special Array With X Elements Greater Than or Equal X Leetcode Solution4683
283Pairs of Songs With Total Durations Divisible by 60 LeetCode Solution4657
284Reveal Cards In Increasing Order Leetcode Solution4643
285Maximum Depth of Binary Tree Leetcode Solution4635
286Sum of Subarray Ranges Leetcode Solution4629
287Intersection of Two Arrays4624
288Maximum Size Subarray Sum Equals k Leetcode Solution4617
289Sort Elements by Frequency of Occurrences4614
290Best Time to Buy and Sell Stock III Leetcode Solution4603
291Reverse Nodes in k-Group LeetCode Solution4601
292N-th Tribonacci Number Leetcode Solution4598
293House Robber4592
294Find any one of the multiple repeating elements in read only array4580
295Remove All Ones With Row and Column Flips Leetcode Solution4571
296Diagonal Traverse LeetCode Solution4569
297Evaluate Division4564
298Maximize Distance to Closest Person LeetCode Solution4561
299Most Frequent Element in an Array4554
300Range Sum Query 2D – Immutable Leetcode Solution4539
301Binary Tree Inorder Traversal LeetCode Solution4535
302Design A Leaderboard Leetcode Solution4535
303Find Index of Closing Bracket for a Given Opening Bracket in an Expression4535
304Reverse individual words4535
305Minimum Characters to be Added at Front to Make String Palindrome4529
306Length of Longest valid Substring4529
307Count of index pairs with equal elements in an array4523
308Find if Path Exists in Graph Leetcode Solution4516
309Last Stone Weight II LeetCode Solution4502
310Count Number of Occurrences in a Sorted Array4497
311Minimum number of Merge Operations to make an Array Palindrome4480
312Remove Duplicates from Sorted List LeetCode Solution4479
313Split Linked List in Parts Leetcode Solution4469
314Partition Array Into Three Parts With Equal Sum Leetcode Solution4464
315Implement a stack using single queue4463
316Dijkstra Algorithm4446
317Find the Closest Palindrome number4435
318Brightest Position on Street LeetCode Solution4432
319Mobile Numeric Keypad Problem4395
320Find Leaves of Binary Tree LeetCode Solution4391
321Arrange given Numbers to Form the Biggest Number II4390
322Reverse Bits4384
323Special Positions in a Binary Matrix Leetcode Solution4369
324Round Robin Scheduling4365
325Spiral Matrix II Leetcode Solution4363
326Symmetric Tree Leetcode Solution4355
327Invalid Transactions LeetCode Solution4348
328Shortest Word Distance Leetcode Solution4338
329Maximum Subarray4333
330Paint House LeetCode Solution4328
331Recursion4314
332Maximal Square4293
333Sort Array By Parity II Leetcode Solution4285
334One Edit Distance LeetCode Solution4283
335Hamming Distance Leetcode Solution4278
336Diagonal Traversal LeetCode Solution4276
337Rank Transform of an Array Leetcode Solution4273
338Find Duplicates in an Array in Most Efficient Way4273
339Partition Labels LeetCode Solution4257
340Find Winner on a Tic Tac Toe Game Leetcode Solution4250
341Remove Invalid Parentheses Leetcode Solution4243
342Minimum Moves to Equal Array Elements Leetcode Solution4242
343Jump Game4239
344Tug of War4238
345Largest Rectangle in Histogram LeetCode Solution4232
346Alien Dictionary LeetCode Solution4232
347Count of Triplets With Sum Less than Given Value4231
348String Matching in an Array Leetcode Solution4230
349Unique Paths4229
350Binary Tree Zigzag Level Order Traversal LeetCode Solution4222
351Minimum Time to Collect All Apples in a Tree LeetCode Solution4200
352Postfix to Prefix Conversion4199
353The Celebrity Problem4182
354Unique Paths III LeetCode Solution4181
355Next Permutation LeetCode Solution4178
356Validate Stack Sequences LeetCode Solution4172
357Given an Array of Pairs Find all Symmetric Pairs in it4171
358Merge Two Sorted Linked Lists4166
359Bitwise AND of Numbers Range LeetCode Solution4164
360Lowest Common Ancestor of a Binary Tree Leetcode Solution4157
361Construct BST from its given Level Order Traversal4152
362Minimum Depth of Binary Tree Leetcode Solution4151
363Transpose Graph4147
364Range Sum of BST LeetCode Solution4143
365Least Number of Unique Integers after K Removals Leetcode Solution4143
366Minimum operation to make all elements equal in array4138
367Smallest Subarray with k Distinct Numbers4137
368Invert Binary Tree LeetCode Solution4129
369Minimum Time Visiting All Points Leetcode Solution4128
370Maximum Circular Subarray Sum4126
371Toeplitz Matrix4118
372Longest Common Prefix using Trie4117
373Clone Graph LeetCode Solution4113
374Maximum Length of a Concatenated String with Unique Characters Leetcode Solution4112
375Pair of Positive Negative Values in an Array4106
376Minimum Number of Steps to Make Two Strings Anagram Leetcode Solutions4092
377Find minimum difference between any two elements4090
378Next Greater Element III LeetCode Solution4080
379Ugly Number II LeetCode Solution4079
380Kruskal Algorithm4079
381Check whether Strings are K Distance Apart or Not4079
382Robot Bounded In Circle LeetCode Solution4078
3834Sum4074
3843 Sum4072
385K Empty Slots LeetCode4072
386Find the First and Second Smallest Elements4062
387Longest Substring with At Most K Distinct Characters LeetCode Solution4061
388Check if a given array contains duplicate elements within k distance from each other4046
389Minimum Cost to Hire K Workers4045
390Substring with Concatenation of All Words Leetcode Solution4039
391Max stack4036
392LRU Cache Implementation4029
393Implementation of Deque using circular array4023
394Longest subarray not having more than K distinct elements4020
395Graph Valid Tree LeetCode Solution4017
396Word Search4014
397Sort a stack using a temporary stack4004
398Sliding Window Technique3996
399Invert Binary Tree LeetCode Solution3995
400Regular Expression Matching Regular Expression Matching LeetCode Solution3995
401Minimize Maximum Pair Sum in Array LeetCode Solution3995
402Stack Permutations (Check if an array is stack permutation of other)3983
403Stone Game II Leetcode3981
404Find the Smallest Divisor given a Threshold Leetcode Solution3977
405Permutation Sequence LeetCode Solution3975
406Longest subsequence such that difference between adjacents is one3975
407Best Time to Buy and Sell Stock with Cooldown Leetcode Solution3971
408Non-decreasing Array LeetCode Solution3965
409Convert Sorted Array to Binary Search Tree LeetCode Solutions3961
410Number Complement Leetcode Solution3960
411Find duplicates in a given array when elements are not limited to a range3960
412Find the subarray with least average3959
413Design Browser History LeetCode Solution3957
414Priority Queue using doubly linked list3955
415Top View of Binary Tree3954
416Kth Smallest Element in a BST Leetcode Solution3952
417Minesweeper LeetCode Solution3944
418Missing Element in Sorted Array LeetCode Solution3940
419Queries for counts of array elements with values in given range3935
420Number of Islands II LeetCode Solution3932
421LRU Cache Leetcode Solution3928
422Painting Fence Algorithm3928
423K Closest Points to Origin Leetcode Solution3923
424Maximum Number of Occurrences of a Substring Leetcode Solution3922
425Common elements in all rows of a given matrix3916
426Nth Catalan Number3913
427Partition List Leetcode Solution3911
428Find the Peak Element from an Array3896
429Path With Maximum Minimum Value LeetCode Solution3891
430Fibonacci Number LeetCode Solution3890
431First Circular Tour to Visit all the Petrol Bunks3888
432Snakes and Ladders LeetCode Solution3887
433Maximum Consecutive Numbers Present in an Array3878
434Can Make Arithmetic Progression From Sequence Leetcode Solution3878
435Find Top K (or Most Frequent) Numbers in a Stream3877
436Number of Smaller Elements on Right Side3873
437Sequences of given length where every element is more than or equal to twice of previous3867
438Sliding Window Maximum LeetCode Solution3864
439Sort elements by frequency3862
440Combination Sum IV LeetCode Solution3859
441Find Maximum Level sum in Binary Tree3857
442Integer Break LeetCode Solution3847
443Tiling Problem3846
444Gold Mine Problem3845
445High Five LeetCode Solution3842
446Flood Fill LeetCode3841
447Insert Interval Leetcode Solution3838
448Odd Even Linked List Leetcode Solution3835
449Search a 2D Matrix II Leetcode Solution3833
450Check if Two given Strings are Isomorphic to each other3829
451Count items common to both the lists but with different prices3827
452Find Minimum in Rotated Sorted Array II LeetCode Solution3824
453Move All the Zeros to the End of the Given Array3822
454N queen problem3817
455Rearrange array such that even positioned are greater than odd3814
456Distance of nearest cell having 1 in a binary matrix3812
457Shortest Palindrome3806
458Longest Palindrome can be Formed by Removing or Rearranging Characters3803
459Interval Tree3789
460Insert into a Binary Search Tree Leetcode Solution3783
461Consecutive Characters LeetCode Solution3781
462Replace Elements with Greatest Element on Right Side Leetcode Solution3780
463Search in a Binary Search Tree Leetcode Solution3777
464Trapping Rain Water LeetCode Solution3765
465Number of Closed Islands Leetcode Solution3764
466Sort Colors3763
467Kth Non-repeating Character3757
468Design a stack that supports getMin() in O(1) time and O(1) extra space3756
469Fibonacci numbers3751
470Find a Peak Element II LeetCode Solution3741
471Integer to English words3741
472Longest Common Prefix using Sorting3739
473Reverse a linked list3738
474Spiral Matrix III LeetCode Solution3734
475Find All Possible Recipes from Given Supplies LeetCode Solution3733
476Minimum Absolute Difference in BST Leetcode Solution3732
477Evaluate Reverse Polish Notation LeetCode Solution3725
478Decompress Run-Length Encoded List Leetcode Solution3723
479Expression Contains Redundant Bracket or Not3723
480Queries for GCD of all numbers of an array except elements in a given range3720
481Sliding Window Median Leetcode Solution3714
482Check If Array Pairs Are Divisible by k LeetCode Solution3713
483Vertical Order Traversal of Binary Tree LeetCode Solution3705
484Convert Sorted Array to Binary Search Tree Leetcode Solution3700
485Find Pythagorean Triplets from Array3699
486Restore IP Addresses Leetcode Solution3697
487Coin Change Problem3697
488Sorting array using Stacks3692
489Binary Tree Maximum Path Sum LeetCode Solution3691
490Minimum Path Sum3689
491Palindrome Substring Queries3683
492Sort an array according to the order defined by another array3665
493Balanced Expression with Replacement3665
494Morris Traversal3662
495Majority Element3662
496Multiplication of Two Matrices3661
497Rearrange an array in order – smallest, largest, 2nd smallest, 2nd largest3648
498Priority Queue in C++3648
499Subset sum problem3639
500Camelcase Matching Leetcode Solution3636
501Best Time to Buy and Sell Stock3635
502Find the first Repeating Number in a Given Array3628
503Number of Days Between Two Dates LeetCode Solution3620
504Find Median from Data Stream LeetCode Solution3618
505Queue using Stacks3617
506Minimum Number of Taps to Open to Water a Garden LeetCode Solution3614
507Cells with Odd Values in a Matrix LeetCode Solution3610
508Path Crossing Leetcode Solution3599
509How to Implement Stack Using Priority Queue or Heap?3597
510Generate all Binary Strings from Given Pattern3592
511Design Hit Counter LeetCode Solution3588
512The Stock Span Problem3585
513Count subarrays having total distinct elements same as original array3575
514Is Graph Bipartite? LeetCode Solution3574
515Sieve of Eratosthenes3574
516Kth ancestor of a node in binary tree3573
517Detect a loop in the Linked List3572
518Path Sum II LeetCode Solution3570
519Analyze User Website Visit Pattern LeetCode Solution3565
520Intersection of Two Linked Lists LeetCode Solution3564
521Longest Increasing Path in a Matrix LeetCode Solution3560
522Pancake Sorting Problem3559
523Shortest Completing Word Leetcode Solution3558
524Find a Fixed Point in a Given Array3557
525Divide Chocolate LeetCode Solution3554
526Letter Case Permutation3545
527Count Submatrices With All Ones LeetCode Solution3542
528Largest rectangular sub-matrix whose sum is 03539
529Monotonic Array Leetcode Solution3538
530Check if Array Contains Contiguous Integers With Duplicates Allowed3531
531Custom Sort String Leetcode Solution3528
532Construction of Longest Increasing Subsequence (N log N)3524
533Group Anagrams3521
534Implement strStr() LeetCode Solution3517
535Minimum Height Trees3515
536Best Time to Buy and Sell Stock with Transaction Fee Leetcode Solution3511
537Different Ways to Add Parentheses Leetcode Solution3506
538Decode Ways3506
539Maximum Element in an Array which is Increasing and then Decreasing3506
540Determine Whether Matrix Can Be Obtained By Rotation LeetCode Solution3501
541Valid Boomerang Leetcode Solution3498
542Merge Overlapping Intervals3493
543Find maximum length Snake sequence3487
544Queue based approach for first non-repeating character in a stream3485
545Nearest Exit from Entrance in Maze LeetCode Solution3475
546Scramble String LeetCode Solution3470
547How to Create Mergable Stack?3468
548Perfect Squares LeetCode Solution3465
549Shifting Letters LeetCode Solution3461
550Number of Distinct Islands Leetcode Solution3461
551Best Time to Buy and Sell Stock IV LeetCode Solution3459
552Find the Lost Element From a Duplicated Array3458
553Decode String3457
554Implement Trie (Prefix Tree) Leetcode Solution3454
555LCS (Longest Common Subsequence) of three strings3446
556First missing positive3438
557Guess Number Higher or Lower II3437
558Longest Common Prefix using Divide and Conquer3437
559Reorder Data in Log Files LeetCode Solution3435
560Design Skiplist LeetCode Solution3434
561Number of Equivalent Domino Pairs Leetcode Solution3433
562Sliding Window Maximum3432
563Most Stones Removed with Same Row or Column LeetCode Solution3429
564Sort a stack using recursion3429
565Maximum Sum of Non Consecutive Elements3429
566Count Possible Triangles3421
567Find if an Expression has Duplicate Parenthesis or Not3420
568Race Car LeetCode Solution3419
569Champagne Tower LeetCode Solution3419
570Build an Array With Stack Operations Leetcode Solution3415
571Binary Tree zigzag level order Traversal3413
572Recover Binary Search Tree3413
573Contiguous Array LeetCode Solution3404
574Insert Node in the Sorted Linked List3404
575All Possible Full Binary Trees LeetCode Solution3403
576Rectangle Overlap LeetCode Solution3401
577Largest Subarray with Equal Number of 0’s and 1’s3400
578Smallest Good Base3388
579Minimum Bracket Reversals3380
580Make Two Arrays Equal by Reversing Sub-arrays Leetcode Solution3379
581Maximum Length of Chain Pairs3379
582Palindrome Permutation LeetCode Solution3365
583Find the two Numbers with Odd Occurrences in an Unsorted Array3361
584Longest Substring with At Least K Repeating Characters LeetCode Solution3355
585Group Multiple Occurrence of Array Elements Ordered by first Occurrence3354
586Maximum Depth of N-ary Tree Leetcode Solution3351
587Maximum Number of Ways to Partition an Array LeetCode Solution3350
588Minimum Height Trees LeetCode Solution3349
589Distance Between Bus Stops Leetcode Solution3347
590Longest Repeated Subsequence3347
591Rearrange Spaces Between Words Leetcode Solution3346
592Find a Sorted Subsequence of size 33346
593Recover Binary Search Tree Leetcode Solution3341
594Design a Stack With Increment Operation Leetcode Solution3337
595Merge Two Binary Trees LeetCode Solution3334
596Find the Town Judge LeetCode Solution3331
597Implement Two Stacks in an Array3330
598Palindrome Partitioning Leetcode Solution3327
599Subarrays with K Different Integers Leetcode Solution3323
600Reorder an Array According to the Given Indexes3321
601Valid Parentheses Leetcode Solution3319
602K-th Distinct Element in an Array3318
603Lowest Common Ancestor of a Binary Search Tree Leetcode Solution3312
604Heap Sort3310
605Print all Palindromic Partitions of a String3310
606Check for Balanced Parentheses in an Expression3301
607Huffman Coding3299
608Maximum sum rectangle in a 2D matrix3289
609Find the First Circular Tour that visits all the Petrol Pumps3287
610Minimum number of jumps to reach end3285
611Maximum Score After Splitting a String Leetcode Solution3283
612Count pair with Given Sum3277
613Contains Duplicate3275
614The Maze III LeetCode Solution3272
615Jump Game IV LeetCode Solution3269
616Sort a String According to Another String3266
617Maximize Elements Using Another Array3264
618Perform String Shifts Leetcode3264
619Merge Overlapping Intervals II3264
620Mean of Array After Removing Some Elements Leetcode Solution3263
621Palindrome Permutation3243
622Word Break3241
623Find First and Last Position of Element in Sorted Array LeetCode Solution3240
624Valid Sudoku3228
625Find the Minimum Element in a Sorted and Rotated Array3227
626Convert BST to Min Heap3220
627Palindrome Permutations of a String3220
628Find Largest Value in Each Tree Row LeetCode Solution3213
629All Unique Triplets that Sum up to a Given Value3211
630Minimum Jumps to Reach Home LeetCode Solution3209
631Possible Bipartition LeetCode Solution3207
632Iterative Method to find Height of Binary Tree3206
633Find all triplets with zero sum3202
634A Space Optimized DP solution for 0-1 Knapsack Problem3202
635Caesar Cipher3202
636Edit Distance LeetCode Solution3197
637Count Sub Islands LeetCode Solution3192
638Find Median from data Stream3178
639Palindromic Substrings Leetcode Solution3174
640My Calendar I LeetCode Solution3167
641Reach a Number LeetCode Solution3166
642Segregate 0s and 1s in an Array3165
643Best Meeting Point LeetCode Solution3155
644Number of palindromic paths in a matrix3154
645Maximum Product of Splitted Binary Tree LeetCode Solution3153
646Level order Traversal in Spiral Form3151
647Find the Subarray of given length with Least Average3149
648Merge Two Balanced Binary Search Trees3140
649Pair with given product3136
650Count Good Nodes in Binary Tree LeetCode Solution3134
651Check if the given array can represent Level Order Traversal of Binary Search Tree3130
652Word Pattern3130
653Rearrange Array such that arr[i] >= arr[j] if i is even and arr[i] <= arr[j] if i is odd and j < i3127
654Breadth First Search (BFS) for a Graph3123
655Alien Dictionary3120
656Validate Binary Search Tree3113
657Partition Problem3103
658Brick Wall LeetCode Solution3102
659Sorted Linked List to Balanced BST3096
660Isomorphic Strings LeetCode Solution3093
661Convert Sorted List to Binary Search Tree3090
662Number of Subsequences That Satisfy the Given Sum Condition LeetCode solution3082
663Find whether a subarray is in form of a mountain or not3081
664Add two numbers3080
665Minimum time required to rot all oranges3078
666How to Efficiently Implement k Stacks in a Single Array?3074
667Construct BST from given Preorder Traversal3073
668Swapping Nodes in a Linked List Leetcode Solution3072
669Sort 0s 1s and 2s in an Array3069
670Shortest Path in a Grid with Obstacles Elimination LeetCode Solution3068
671Maximize Sum of Array after K Negations Leetcode Solution3067
672Largest Sum Contiguous Subarray3056
673Longest Subarray Having Count of 1s One More than Count of 0s3055
674Queries on Probability of Even or Odd Number in given Ranges3055
675Populating Next Right Pointers in Each Node3054
676Rotate Array3054
677Bubble sort using two Stacks3053
678Merge K Sorted Arrays and Print Sorted Output3052
679Remove brackets from an algebraic string containing + and – operators3051
680Print Fibonacci sequence using 2 variables3046
681Find all pairs (a, b) in an array such that a % b = k3043
682Range Sum Query 2D – Immutable LeetCode Solution3034
683Find four elements that sum to a given value (Hashmap)3031
684Count Distinct Elements in Every Window of Size K3029
685Find Zeros to be Flipped so that Number of Consecutive 1’s is Maximized3029
686Maximum Number of Chocolates to be Distributed Equally Among k Students3025
687Count ways to reach the nth stair using step 1, 2 or 33022
688Filter Restaurants by Vegan-Friendly, Price and Distance Leetcode Solution3020
689Maximum Frequency Stack Leetcode Solution3008
690Merge Two Sorted Lists Leetcode3008
691Detect Capital Leetcode Solution3000
692Minimum Swaps to Group All 1’s Together Leetcode Solution2994
693Difference Array | Range update query in O(1)2985
694Split Array Into Consecutive Subsequences2985
695Partition Equal Subset Sum2985
696Binary Tree Right Side View LeetCode Solution2983
697Counting Bits2979
698Remove Palindromic Subsequences Leetcode Solution2976
699Remove duplicates from sorted array2976
700Binary Tree to Binary Search Tree Conversion2974
701Partition to K Equal Sum Subsets Leetcode Solution2971
702Print all subarrays with 0 sum2968
703Contiguous Array Leetcode2967
704Check if a Linked list of Strings form a Palindrome2964
705Happy Number2956
706Length of Longest Fibonacci Subsequence2954
707Topological Sorting2954
708Minimum Sum Path in a Triangle2949
709Elements Appear more than N/K times in Array2948
710Find pairs with given sum such that elements of pair are in different rows2939
711Minimum Swaps to Make Strings Equal Leetcode Solution2936
712Concatenation of Array LeetCode Solution2935
713Populating Next Right Pointers in Each Node Leetcode Solution2933
714Arithmetic Slices II – Subsequence LeetCode Solution2928
715Minimum Number of Arrows to Burst Balloons LeetCode Solution2923
716Reverse Nodes in K-Group2917
717String comparison containing wildcards2917
718Find All Pairs With a Given Difference2916
719Web Crawler LeetCode Solution2912
720Inorder Successor of a node in Binary Tree2912
721MiniMax Algorithm2909
722Queue Reconstruction by Height2908
723An Interesting Method to generate Binary Numbers from 1 to n2900
724Increasing Subsequence of Length three with Maximum Product2878
725Maximum Distance in Array2877
726Score of Parenthesis LeetCode Solution2875
727Swap Kth Node from beginning with Kth Node from End2870
728Root to Leaf path with target sum Leetcode Solutions2862
729Longest Increasing Subsequence2862
730Given a binary tree, how do you remove all the half nodes?2860
731Finding K closest element2857
732Union and Intersection of two Linked Lists2849
733Longest Common Prefix Using Binary Search II2849
734Find Duplicate Subtrees2848
735Climbing stairs2848
736Iterative Preorder Traversal2847
737Delete Nth node from the end of the given linked list2846
738Check if String Follows Order of Characters by a Pattern or not2844
739Pancake Sorting2829
740BFS vs DFS for Binary Tree2826
741Construct Binary Tree from given Parent Array representation2819
742Maximum Product Subarray II2819
743Find the first repeating element in an array of integers2818
744Container with Most Water2816
745Find K Closest Elements LeetCode Solution2814
746Symmetric Tree2814
747Parallel Courses II LeetCode Solution2807
748Count Minimum Steps to Get the given Array2804
749Deletion in a Binary Tree2796
750Construct Binary Tree from Preorder and Postorder Traversal LeetCode Solution2787
751Find the Difference Leetcode Solution2783
752Nested List Weight Sum II LeetCode Solution2780
753Check if all levels of two Binary Tree are anagrams or not2778
754Delete Nodes and Return Forest Leetcode Solution2776
755Rearrange an Array Such that arr[i] is equal to i2773
756Minimum Cost to Move Chips to The Same Position LeetCode Solution2769
757Level order traversal using two Queues2769
758Sum Root to Leaf Numbers LeetCode Solution2765
759Find Maximum of Minimum for Every Window Size in a Given Array2765
760Level of Each node in a Tree from source node2765
761Substring With Concatenation Of All Words2762
762Kill Process LeetCode Solution2759
763Tree Traversal (Preorder, Inorder & Postorder)2758
764Boundary Traversal of binary tree2757
765Minimum Size Subarray Sum2756
766Sort Array by Increasing Frequency Leetcode Solution2751
767Super Ugly Number2751
768Count pairs from two linked lists whose sum is equal to a given value2750
769Linked List Cycle2747
770Iterative Depth First Traversal of Graph2744
771Non-overlapping sum of two sets2743
772Minimum Remove to Make Valid Parentheses LeetCode Solution2742
773K maximum sums of overlapping contiguous sub-arrays2737
774Check if any two intervals overlap among a given set of intervals2734
775Reorder Array Using Given Indexes2734
776Matrix Chain Multiplication2730
777New 21 Game2729
778Valid Anagrams2728
779Remove Duplicates from Sorted List II2724
780Flatten Binary Tree to Linked List LeetCode Solution2720
781Sum of f(a[i], a[j]) over all pairs in an array of n integers2719
782Maximum size subarray sum equals k2719
783Longest Common Prefix Word by Word Matching2719
784Merging Intervals2717
785Reservoir Sampling2710
786Merge K Sorted Linked Lists2706
787Range LCM Queries2705
788Palindrome Partitioning2703
789Print a Binary Tree in Vertical Order2692
790Sorting a K Sorted Array2692
791Balanced Binary Tree2687
792Hamming Distance2685
793Missing Number2680
794The Painter’s Partition Problem2676
795Maximum Product Subarray2669
796Peak Index in a Mountain Array LeetCode Solution2665
797Create Maximum Number2664
798Maximum difference between two elements such as larger element comes after smaller2662
799Iterative Postorder Traversal Using Two Stacks2655
800Check if Two Expressions With Brackets are Same2655
801Friends Of Appropriate Ages LeetCode Solution2654
802Check if a queue can be sorted into another queue using a stack2654
803Defanging an IP Address LeetCode Solution2651
804Valid Triangle Number LeetCode Solution2650
805Find Maximum Sum Possible Equal Sum of Three Stacks2646
806Lowest Common Ancestor2643
807Verify Preorder Serialization of a Binary Tree2641
808Find Three Element From Different Three Arrays Such That a + b + c = sum2640
809Minimum insertions to form a palindrome with permutations allowed2635
810Count number of triplets with product equal to given number2632
811Find Sum of all unique sub-array sum for a given array2630
812Sort Elements by Frequency II2630
813Find Element Using Binary Search in Sorted Array2628
814Unique Binary Search Trees LeetCode Solution2626
815Find distance between two nodes of a Binary Tree2624
816Valid Triangle Number LeetCode Solution2623
817Maximum difference between frequency of two elements such that element having greater frequency is also greater2623
818Find subarray with given sum (Handles Negative Numbers)2623
819Check if a given array can represent Preorder Traversal of Binary Search Tree2621
820Vertical sum in a given binary tree2621
821Newman-Conway Sequence2618
822Smallest Range II Leetcode Solution2617
823Check if two nodes are on the same path in a Tree2600
824Merging Two Sorted Arrays2600
825Largest Submatrix With Rearrangements LeetCode Solution2599
826Minimum Distance Between BST Nodes Leetcode Solution2599
827Number Of Longest Increasing Subsequence2598
828Find K Length Subarray of Maximum Average2598
829Segment Tree2590
830Maximum subsequence sum such that no three are consecutive2588
831Check Completeness of a Binary Tree LeetCode Solution2587
832First Bad Version2585
833Find Common Characters Leetcode Solution2582
834Third Maximum Number Leetcode Solution2581
835Print all triplets in sorted array that form AP2581
836Print All Distinct Elements of a Given Integer Array2576
837Flatten 2D Vector LeetCode Solution2573
838Products of ranges in an array2570
839Arrange given numbers to form the biggest number2570
840Range Sum Query using Sparse Table2569
841Maximum number of segments of lengths a, b and c2569
842Largest subarray with equal number of 0s and 1s2568
843Lower Case To Upper Case2567
844Longest Bitonic Subsequence2565
845Find Smallest Range Containing Elements from k Lists2559
846Closest Leaf in a Binary Tree LeetCode Solution2554
847Diagonal Traversal of Binary Tree2552
848Kth Smallest Element in a Sorted Matrix LeetCode Solution2550
849Find Peak Element2549
850Valid Parenthesis String2547
851Array Nesting Leetcode Solution2546
852Employee Importance LeetCode Solution2546
853Stone Game IV LeetCode Solution2545
854Trapping Rain Water II LeetCode Solution2540
855Median of Two Sorted Arrays2536
856Find Nth Node2536
857Maximum Population Year LeetCode Solution2533
858Contiguous Array2529
859Compare Strings by Frequency of the Smallest Character Leetcode Solution2526
860Print Right View of a Binary Tree2526
861Distinct Subsequences2523
862Write a function to get the intersection point of two Linked Lists2518
863Longest Palindromic Subsequence2518
864Bottom View of a Binary Tree2516
865Largest BST Subtree LeetCode Solution2509
866Shuffle an Array2508
867Largest divisible pairs subset2506
868Infix to Postfix2503
869Four Elements that Sum to Given2499
870Number of siblings of a given Node in n-ary Tree2493
871Path Sum2492
872Count and Say2489
873Stone Game IV LeetCode Solution2486
874Find the largest multiple of 32482
875Binary array after M range toggle operations2481
876Subset Sum Problem in O(sum) space2481
877Isomorphic Strings2481
878Merge Two Sorted Arrays2477
879Permutations of a Given String Using STL2475
880Unique Binary Search Trees2473
881Red-Black Tree Introduction2469
882Minimum Swaps To Make Sequences Increasing LeetCode Solution2465
883Closest Binary Search Tree Value Leetcode Solution2461
884Friends Pairing Problem2455
885Height of a generic tree from parent array2455
886Next Greater Element in an Array2453
887Maximum Side Length of a Square with Sum Less than or Equal to Threshold LeetCode Solution2452
888The Number of Weak Characters in the Game LeetCode Solution2448
889Maximum Product Subarray2442
890Find Largest d in Array such that a + b + c = d2440
891Count Primes in Ranges2437
892Valid Perfect Square LeetCode Solution2430
893Valid Number2428
894Sentence Screen Fitting LeetCode Solution2427
895Insert Delete GetRandom2418
896Encoded String With Shortest Length LeetCode Solution2417
897Rearrange an array such that ‘arr[j]’ becomes ‘i’ if ‘arr[i]’ is ‘j’2415
898Range Minimum Query (Square Root Decomposition and Sparse Table)2414
899Transform a BST to Greater sum Tree2410
900Print n terms of Newman-Conway Sequence2407
901Averages of Levels in Binary Tree2407
902Find unique character in a string2397
903Shuffle a given Array2391
904Binary Search Tree Delete Operation2390
905Maximum Sum of 3 Non-Overlapping Subarrays2385
906Step-By-Step Directions From a Binary Tree Node to Another LeetCode Solution2382
907Edit Distance2380
908Binary Tree Longest Consecutive Sequence LeetCode Solution2377
909Convert BST into a Min-Heap without using array2377
910Integer to Roman2369
911Serialize and Deserialize Binary Tree LeetCode Solution2365
912Reorganize String2364
913Minimum sum of squares of character counts in a given string after removing k characters2363
914Orderly Queue LeetCode Solution2359
915Maximum Product Subarray2355
916Range Queries for Longest Correct Bracket Subsequence2352
917Next greater element2350
918Find Minimum In Rotated Sorted Array2347
919Serialize and Deserialize Binary Tree2346
920Kth Smallest Number in Multiplication Table Leetcode Solution2343
921Lowest Common Ancestor in Binary Search Tree2336
922Koko Eating Bananas LeetCode Solution2335
923Array Queries for multiply replacements and product2334
924Next Greater Element II LeetCode Solution2333
925K’th Largest element in BST using constant extra space2333
926Bold Words in String LeetCode Solution2332
927Find the smallest binary digit multiple of given number2331
928Swap Nodes In Pairs2329
929Maximum Sum Increasing Subsequence2313
930Diameter of N-Ary Tree LeetCode Solution2312
931K’th Largest Element in BST when modification to BST is not allowed2302
932Advantages of BST over Hash Table2298
933Insert into a Sorted Circular Linked List LeetCode Solution2296
934Constant time range add operation on an array2296
935Moving Stones Until Consecutive Leetcode Solution2294
936Write Code to Determine if Two Trees are Identical2289
937Design Underground System Leetcode Solution2284
938Valid Tic-Tac-Toe State LeetCode Solution2275
939Best Meeting Point LeetCode Solution2274
940Queries on XOR of greatest odd divisor of the range2256
941Check if an Array is Stack Sortable2256
942Reverse a Path in BST using Queue2251
943Power of Two2251
944Longest Increasing Consecutive Subsequence2250
945Number of elements less than or equal to a given number in a given subarray2248
946Numbers with prime frequencies greater than or equal to k2247
947Total Hamming Distance LeetCode Solution2246
948Check if each internal node of a BST has exactly one child2237
949Number of Orders in the Backlog Leetcode Solution2236
950Check if X can give change to every person in the Queue2235
951Greatest Sum Divisible by Three LeetCode Solution2232
952Form minimum number from given sequence2230
953Image Overlap LeetCode Solution2229
954Clone a Binary Tree with Random Pointers2227
955Level Order Traversal of Binary Tree2227
956Maximum Array from Two given Arrays Keeping Order Same2226
957Find the node with minimum value in a Binary Search Tree2226
958A program to check if a binary tree is BST or not2223
959Count the Pairs at Same Distance as in English Alphabets2223
960Find minimum number of merge operations to make an array palindrome2222
961Design Add and Search Words Data Structure LeetCode Solution2216
962Graph Cloning2212
963Factorial Trailing Zeroes LeetCode Solution2206
964Count and Toggle Queries on a Binary Array2205
965Merge Sort2205
966Collect maximum points in a grid using two traversals2202
967Closest Binary Search Tree Value II LeetCode Solution2195
968Largest Plus Sign Leetcode Solution2190
969Form Minimum Number From Given Sequence2188
970Check for Palindrome after every character replacement Query2187
971Print Next Greater Number of Q queries2185
972Merge two BSTs with limited extra space2184
973Queries for Decimal Values of Subarrays of a Binary Array2179
974Merge Sorted Array2179
975Maximum difference between first and last indexes of an element in array2177
976Group Shifted Strings Leetcode Solution2175
977Dividing Array into Pairs With Sum Divisible by K2174
978Print all Possible Ways to Break a String in Bracket Form2174
979Print Ancestors of a Given Binary Tree Node Without Recursion2153
980Priority Queue2150
981Excel Sheet Column Number LeetCode Solution2142
982Count even length binary sequences with same sum of first and second half bits2135
983Print modified array after multiple array range increment operations2135
984Longest Substring Without Repeating Characters Leetcode Solution2129
985Binary Search Tree2124
986Guess The Word2124
987Palindrome Partitioning2121
988Swim in Rising Water LeetCode Solution2119
989Minimum Moves to Equal Array Elements LeetCode Solution2114
990Cutting a Rod2111
991Find postorder traversal of BST from preorder traversal2104
992Kth Smallest Element in a BST2100
993Unique Paths II2090
994Excel Sheet Column Title LeetCode Solution2089
995Count Pairs Whose Products Exist in Array2081
996Find maximum average subarray of k length2071
997Insert Delete GetRandom O(1) – Duplicates allowed LeetCode Solution2070
998How to print maximum number of A’s using given four keys2068
999Binary Search Tree Search and Insertion2064
1000Regular Expression Matching2062
1001Longest Common Prefix using Character by Character Matching2051
1002Check given array of size n can represent BST of n levels or not2047
1003Sum of Left Leaves LeetCode Solution2046
1004K Empty Slots2036
1005Sorted Array to Balanced BST2014
1006Queries for Number of Distinct Elements in a Subarray2010
1007Minimum Possible Integer After at Most K Adjacent Swaps On Digits LeetCode Solution2008
1008Decrease Elements To Make Array Zigzag LeetCode Solution1998
1009Maximum Depth Of Binary Tree1990
1010Iterative method to find ancestors of a given binary tree1982
1011Find the Town Judge LeetCode Solution1973
1012Construct Complete Binary Tree from its Linked List Representation1971
1013Shortest Unsorted Continuous Subarray LeetCode Solution1960
1014Binary Tree to Binary Search Tree Conversion using STL set1940
1015Maximum weight transformation of a given string1939
1016Find Maximum Depth of Nested Parenthesis in a String1939
1017Symmetric Tree LeetCode Solution Leetcode Solution1922
1018Data Structure Designing1905
1019Random Pick Index LeetCode Solution1904
1020Search in Sorted Rotated Array1893
1021Convert a BST to a Binary Tree such that sum of all greater keys is added to every key1863
1022Search an Element in Sorted Rotated Array1850
1023Kth Smallest Product of Two Sorted Arrays LeetCode Solution1848
1024Next Greater Element I Leetcode Solution1847
1025Minimum Number of Operations to Move All Balls to Each Box LeetCode Solution1834
1026Print Maximum Length Chain of Pairs1828
1027Flatten Binary Tree to Linked List LeetCode Solution1805
1028Maximum Binary Tree1784
1029Find k-th smallest element in BST (Order Statistics in BST)1754
1030Peeking Iterator LeetCode Solution1749
1031Find Two Non-overlapping Sub-arrays Each With Target Sum LeetCode Solution1698
Translate »