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 Solution43848
2Maximum occurring character in a string19914
3Plus One Leetcode Solution19627
4Valid Parentheses LeetCode Solution19416
53Sum Leetcode Solution17719
6Merge Sorted Arrays Leetcode Solution15559
7First Repeating Element15376
8Single Number Leetcode Solution15073
9Count Primes Leetcode Solutions14861
10Pow(x, n) Leetcode Solution14780
11Sqrt(x) Leetcode Solution14564
12Meeting Rooms II LeetCode Solution13588
13Concatenation of Array LeetCode Solution13048
14Roman to Integer Leetcode Solution12191
15Valid Palindrome Leetcode Solution12012
16Search Insert Position Leetcode Solution11928
17Contains Duplicate II Leetcode Solution11916
18Palindrome Number LeetCode Solution11767
19Remove Duplicates from Sorted Array Leetcode Solution11610
20Jump Game Leetcode Solution11342
21Reverse Vowels of a String Leetcode Solution11293
22Longest Substring Without Repeating Characters LeetCode Solution11281
23Number of Good Pairs Leetcode Solution11278
24Intersection of Two Arrays II Leetcode Solution11235
25Spiral Matrix LeetCode Solution11000
26House Robber Leetcode Solution10945
27Kids With the Greatest Number of Candies Leetcode Solution10914
28Add Binary Leetcode Solution10806
29Maximum Subarray Leetcode Solution10465
30Number Of 1 bits10407
31Find the Maximum Repeating Number in Array10183
32Text Justification LeetCode Solution10100
33Move Zeroes LeetCode Solution9974
34Jewels and Stones Leetcode Solution9947
35Min Stack Leetcode Solution9937
36Power of Two Leetcode Solution9694
37Longest Palindromic Substring LeetCode Solution9687
38Permutations Leetcode Solution9653
39Shuffle String Leetcode Solution9643
40Word Search Leetcode Solution9556
41Third Maximum Number Leetcode Solution9495
42Daily Temperatures Leetcode Solution9491
43Evaluation of Postfix Expression9460
44Find All Numbers Disappeared in an Array Leetcode Solution9448
45Median of Two Sorted Arrays LeetCode Solution9416
46Next Permutation Leetcode Solution9346
47Search in Rotated Sorted Array Leetcode Solution9334
48Number of Islands LeetCode Solution9226
49Kth Missing Positive Number Leetcode Solution9208
50Maximum Profit in Job Scheduling Leetcode Solution9203
51Next Greater Element I Leetcode Solution9123
52Longest Common Prefix Leetcode Solution9078
53Frog Jump Leetcode Solution8931
54Valid Anagram Leetcode Solution8881
55Running Sum of 1d Array Leetcode Solution8798
56Find Minimum Distance Between Two Numbers in an Array8776
57Shuffle the Array Leetcode Solution8764
58Rotate Image LeetCode Solution8705
59Combination Sum Leetcode Solution8673
60Multiply Strings Leetcode Solution8664
61Can Place Flowers LeetCode Solution8654
62Boolean Parenthesization Problem8599
63House Robber II Leetcode Solution8588
64Count and Say Leetcode Solution8571
653Sum Closest LeetCode Solution8503
66Bulb Switcher LeetCode Solution8452
67Koko Eating Bananas Leetcode Solution8373
68Best Time to Buy and Sell Stock LeetCode Solution8343
69Subarray and Subsequence8275
70Excel Sheet Column Title Leetcode Solution8263
71Happy Number Leetcode Solution8257
72Isomorphic Strings Leetcode Solution8212
73Majority Element Leetcode Solution8191
74Candy LeetCode Solution8183
75Missing Number Leetcode Solution8149
76Count Pairs With Given Sum8125
77Integer to Roman Leetcode Solution8123
78Product of array except self8024
79A Product Array Puzzle8019
80Rotate String LeetCode Solution7992
81Strobogrammatic Number LeetCode Solution7973
82Binary Search LeetCode Solution7908
83Reverse String Without Temporary Variable7866
84Is Subsequence Leetcode Solution7859
85Find the Difference Leetcode Solution7832
86Find the Duplicate Number LeetCode Solution7829
87Expression Evaluation7799
88Largest Number Leetcode Solution7794
89Find Common Characters Leetcode Solution7775
90Subtract the Product and Sum of Digits of an Integer Leetcode Solution7654
91String to Integer (atoi) LeetCode Solution7626
92Subset Leetcode7615
93Rabin Karp Algorithm7589
94How Many Numbers Are Smaller Than the Current Number Leetcode Solution7573
95Summary Ranges Leetcode Solution7516
96Set Matrix Zeroes7493
97Balanced Binary Tree Leetcode Solution7451
98Word Pattern LeetCode Solution7418
99Sort Characters By Frequency LeetCode Solution7399
100Find the Town Judge Leetcode Solution7392
101Find the Winner of the Circular Game LeetCode Solution7358
102Unique Paths Leetcode Solution7336
103Arranging Coins Leetcode Solution7331
104Rearrange Positive and Negative Numbers Alternatively in Array7295
105Group Anagrams LeetCode Solution7258
106Postfix to Infix Conversion7256
107String Compression LeetCode Solution7182
108Asteroid Collision LeetCode Solution7151
109Page Replacement Algorithms in Operating Systems7111
110Repeated Substring Pattern LeetCode Solution7071
111Smallest window in a string containing all characters of another string7045
112Sort Colors LeetCode Solution6996
113Best Time to Buy and Sell Stock  II Leetcode Solution6992
114Matrix Chain Multiplication using Dynamic Programming6992
115Sum of minimum and maximum elements of all subarrays of size k6857
116Sort Array By Parity LeetCode Solution6855
117Zigzag Conversion LeetCode Solution6832
118Kth largest element in an Array Leetcode Solutions6821
119Valid Palindrome II Leetcode Solution6813
120Divide Two Integers Leetcode Solution6775
121Generate Parentheses Leetcode Solution6771
122Find the Row with Maximum Number of 1’s6740
123Assign Cookies Leetcode Solution6735
124Decode String Leetcode Solution6721
125Pascal Triangle Leetcode6719
126Product of Array Except Self LeetCode Solution6654
127Reverse Integer Leetcode Solution6642
128Remove Duplicates from Sorted Array II Leetcode Solution6641
129H-Index Leetcode Solution6628
130Length of Last Word Leetcode Solution6624
131Bus Routes Leetcode Solution6570
132Number of Provinces Leetcode Solution6545
133Prefix to Infix Conversion6527
134Merge Two Sorted Lists Leetcode Solutions6525
135Linked List Cycle II LeetCode Solution6480
136Minimum Steps to reach target by a Knight6456
137Convert array into Zig-Zag fashion6455
138Minimum Cost For Tickets Leetcode Solution6435
139Employee Free Time LeetCode Solution6434
140Optimal Account Balancing LeetCode Solution6428
141Defanging an IP Address Leetcode Solution6409
142Pascal’s Triangle II Leetcode Solution6369
143Find First and Last Position of Element in Sorted Array Leetcode Solution6341
144Island Perimeter Leetcode Solution6318
145Bellman Ford Algorithm6288
146Implementation of Deque using Doubly Linked List6284
147OSI Model6257
148First element occurring k times in an array6243
149Merge Sorted Array LeetCode Solution6239
150Increasing Triplet Subsequence LeetCode Solution6235
151Majority Element II Leetcode Solution6210
152Build Array From Permutation Leetcode Solution6203
153KMP Algorithm6195
154Robot Room Cleaner Leetcode Solution6188
155Max Consecutive Ones Leetcode Solution6154
156Guess Number Higher or Lower LeetCode Solution6142
157Find Pair with Given Difference6115
158Check if the Elements of an Array are Consecutive6112
159K-th Smallest Element in a Sorted Matrix6097
160Swap Nodes in Pairs Leetcode Solutions6087
161Add Two Numbers II Leetcode Solution6062
162Find the Missing Number6058
163Set Matrix Zeroes Leetcode Solution6057
164Lemonade Change Leetcode Solution6042
165Trapping Rain Water Leetcode Solution5992
166First negative integer in every window of size k5991
167Design Parking System Leetcode Solution5982
168Fibonacci Number LeetCode Solution5973
169Subarray Sum Equals K LeetCode Solution5950
170Delete middle element of a stack5935
171Word Ladder LeetCode Solution5903
172First Unique Character in a String LeetCode Solution5902
173Last Stone Weight5896
174Coin Change 2 Leetcode Solution5891
175Subarray with Given Sum5880
176Length of the largest subarray with contiguous elements5871
177Monotonic Array LeetCode Solution5869
178String Compression5864
179Capacity To Ship Packages Within D Days Leetcode Solution5861
180Find All Duplicates in an Array LeetCode Solution5859
181Subarray Product Less Than K LeetCode Solution5842
182Form Minimum Number from Given Sequence of D’s and I’s5831
183Repeated Substring Pattern5823
184Palindrome Linked List Leetcode Solution5807
185Single Element in a Sorted Array LeetCode Solution5804
186Find Smallest Missing Number in a Sorted Array5775
187Leetcode Permutations5719
188Continuous Subarray Sum LeetCode Solution5705
18901 Matrix LeetCode Solution5685
190Remove Duplicates from Sorted List II LeetCode Solution5684
191Combinations Leetcode Solution5671
192Prefix to Postfix Conversion5669
193Combination Sum5626
194Break a Palindrome LeetCode Solution5610
195Reverse Words in a String III LeetCode Solution5610
196Valid Perfect Square Leetcode Solution5598
197Iterative Implementation of Quick Sort5597
198Remove Linked List Elements Leetcode Solution5594
199Same Tree LeetCode Solution5585
200Insert Delete GetRandom O(1) Leetcode Solution5557
201Merge k Sorted Lists Leetcode Solution5536
202Rotate List Leetcode Solution5535
203Container With Most Water LeetCode Solution5528
204Contains Duplicate LeetCode Solution5526
205Relative Ranks Leetcode Solution5523
206Top K Frequent Elements LeetCode Solution5511
207Slowest Key Leetcode Solution5508
208Backspace String Compare5479
209Find Peak Element LeetCode Solution5468
210Cuckoo sequence program5459
211Maximum Product of Three Numbers LeetCode Solution5443
212Subarray Sum Equals k5390
213Palindrome Number5386
214Find the Duplicate Element5373
215Printing brackets in Matrix Chain Multiplication Problem5366
216Kth Largest Element in a Stream Leetcode Solution5361
217The K Weakest Rows in a Matrix Leetcode Solution5355
218Longest Common Subsequence LeetCode Solution5340
219Max Area of Island5299
220Second Most Repeated Word in a Sequence5287
221Find Leaders in an Array5287
222Remove All Occurrences of a Substring LeetCode Solution5274
223Rearrange given Array in Maximum Minimum Form5269
224Generate all Binary Strings Without Consecutive 1’s5266
225Relative Sort Array Leetcode Solution5256
226Unique Paths II Leetcode Solution5253
227Scramble String5252
228Check If Two String Arrays are Equivalent Leetcode Solution5250
229Convert a Number to Hexadecimal Leetcode Solution5237
230Permutation in String Leetcode Solution5231
231Arithmetic Expression Evaluation5228
232Make The String Great Leetcode Solution5221
233Target Sum5221
234Find Triplet in Array With a Given Sum5212
235Delete Node in a Linked List Leetcode Solution5195
236Letter Combinations of a Phone Number5185
237Count Good Nodes in Binary Tree Leetcode Solution5175
238N-Queens LeetCode Solution5167
239Time Based Key-Value Store LeetCode Solution5162
240Moving Average from Data Stream Leetcode Solution5157
241Construct Binary Tree from Given Inorder and Preorder Traversals5148
242Stone Game LeetCode5139
243Next Permutation5117
244LRU Cache LeetCode Solution5104
245Prim’s Algorithm5101
246Number of Dice Rolls With Target Sum LeetCode Solution5090
247Find N Unique Integers Sum up to Zero Leetcode Solution5088
248Minimum Operations to convert X to Y5088
249Check If N and Its Double Exist Leetcode Solution5063
250Remove Minimum Characters so that Two Strings Become Anagrams5032
251Min Stack5031
252Number of Steps to Reduce a Number to Zero Leetcode Solution5024
253Given two unsorted arrays find all pairs whose sum is x5022
254Flipping an Image LeetCode Solution4983
255Find The Duplicate Number4967
256Minimum Knight Moves LeetCode Solution4960
257Minimum swaps required to bring all elements less than or equal to k together4956
258Top K Frequent Elements4952
259Stock Buy Sell to Maximize Profit4946
260Min Cost Climbing Stairs LeetCode Solution4938
261Reverse Only Letters LeetCode Solution4920
262Student Attendance Record I Leetcode Solution4918
263Smallest Positive Number Missing in an Unsorted Array4911
264To Lower Case Leetcode Solution4880
265Maximum Sum Increasing Subsequence4876
266Single Number4867
267License Key Formatting Leetcode Solution4866
268Reverse words in a string4849
269The kth Factor of n Leetcode Solution4844
270Maximum Subarray Sum using Divide and Conquer4843
271Maximum Population Year LeetCode Solution4785
272Top K Frequent Words LeetCode Solution4750
273Sudoku Solver4748
274Longest Common Subsequence4746
275Find the Number Occurring Odd Number of Times in an Array4726
276BFS for Disconnected Graph4717
277Remove Nth Node From End of List Leetcode Solution4708
278Find Words That Can Be Formed by Characters Leetcode Solution4700
279Search Suggestions System LeetCode Solution4696
280Minimum Path Sum Leetcode Solution4695
281Reformat Date LeetCode Solution4688
282Special Array With X Elements Greater Than or Equal X Leetcode Solution4687
283Pairs of Songs With Total Durations Divisible by 60 LeetCode Solution4665
284Reveal Cards In Increasing Order Leetcode Solution4652
285Maximum Depth of Binary Tree Leetcode Solution4645
286Sum of Subarray Ranges Leetcode Solution4634
287Intersection of Two Arrays4631
288Sort Elements by Frequency of Occurrences4626
289Maximum Size Subarray Sum Equals k Leetcode Solution4624
290Reverse Nodes in k-Group LeetCode Solution4614
291Best Time to Buy and Sell Stock III Leetcode Solution4611
292N-th Tribonacci Number Leetcode Solution4604
293House Robber4598
294Find any one of the multiple repeating elements in read only array4590
295Remove All Ones With Row and Column Flips Leetcode Solution4577
296Diagonal Traverse LeetCode Solution4576
297Evaluate Division4575
298Maximize Distance to Closest Person LeetCode Solution4569
299Most Frequent Element in an Array4561
300Find Index of Closing Bracket for a Given Opening Bracket in an Expression4550
301Range Sum Query 2D – Immutable Leetcode Solution4549
302Design A Leaderboard Leetcode Solution4548
303Binary Tree Inorder Traversal LeetCode Solution4545
304Reverse individual words4542
305Minimum Characters to be Added at Front to Make String Palindrome4539
306Length of Longest valid Substring4538
307Count of index pairs with equal elements in an array4533
308Find if Path Exists in Graph Leetcode Solution4524
309Last Stone Weight II LeetCode Solution4510
310Count Number of Occurrences in a Sorted Array4504
311Minimum number of Merge Operations to make an Array Palindrome4490
312Remove Duplicates from Sorted List LeetCode Solution4486
313Split Linked List in Parts Leetcode Solution4481
314Partition Array Into Three Parts With Equal Sum Leetcode Solution4473
315Implement a stack using single queue4472
316Dijkstra Algorithm4457
317Find the Closest Palindrome number4439
318Brightest Position on Street LeetCode Solution4437
319Mobile Numeric Keypad Problem4403
320Arrange given Numbers to Form the Biggest Number II4403
321Find Leaves of Binary Tree LeetCode Solution4401
322Reverse Bits4395
323Special Positions in a Binary Matrix Leetcode Solution4382
324Spiral Matrix II Leetcode Solution4371
325Round Robin Scheduling4368
326Symmetric Tree Leetcode Solution4367
327Invalid Transactions LeetCode Solution4358
328Shortest Word Distance Leetcode Solution4346
329Maximum Subarray4342
330Paint House LeetCode Solution4335
331Recursion4330
332Maximal Square4299
333One Edit Distance LeetCode Solution4291
334Sort Array By Parity II Leetcode Solution4289
335Diagonal Traversal LeetCode Solution4282
336Hamming Distance Leetcode Solution4282
337Rank Transform of an Array Leetcode Solution4281
338Find Duplicates in an Array in Most Efficient Way4281
339Partition Labels LeetCode Solution4268
340Find Winner on a Tic Tac Toe Game Leetcode Solution4267
341Remove Invalid Parentheses Leetcode Solution4250
342Minimum Moves to Equal Array Elements Leetcode Solution4250
343Jump Game4247
344Tug of War4245
345Largest Rectangle in Histogram LeetCode Solution4244
346Alien Dictionary LeetCode Solution4243
347Count of Triplets With Sum Less than Given Value4242
348Unique Paths4237
349String Matching in an Array Leetcode Solution4234
350Binary Tree Zigzag Level Order Traversal LeetCode Solution4225
351Postfix to Prefix Conversion4212
352Minimum Time to Collect All Apples in a Tree LeetCode Solution4205
353Unique Paths III LeetCode Solution4194
354The Celebrity Problem4192
355Next Permutation LeetCode Solution4191
356Given an Array of Pairs Find all Symmetric Pairs in it4184
357Validate Stack Sequences LeetCode Solution4179
358Merge Two Sorted Linked Lists4176
359Bitwise AND of Numbers Range LeetCode Solution4173
360Lowest Common Ancestor of a Binary Tree Leetcode Solution4163
361Minimum Depth of Binary Tree Leetcode Solution4160
362Construct BST from its given Level Order Traversal4160
363Minimum Time Visiting All Points Leetcode Solution4157
364Range Sum of BST LeetCode Solution4155
365Transpose Graph4155
366Least Number of Unique Integers after K Removals Leetcode Solution4152
367Smallest Subarray with k Distinct Numbers4145
368Minimum operation to make all elements equal in array4144
369Invert Binary Tree LeetCode Solution4143
370Maximum Circular Subarray Sum4137
371Toeplitz Matrix4128
372Maximum Length of a Concatenated String with Unique Characters Leetcode Solution4124
373Longest Common Prefix using Trie4123
374Clone Graph LeetCode Solution4118
375Pair of Positive Negative Values in an Array4118
376Minimum Number of Steps to Make Two Strings Anagram Leetcode Solutions4101
377Find minimum difference between any two elements4100
378Kruskal Algorithm4093
379Robot Bounded In Circle LeetCode Solution4089
380Ugly Number II LeetCode Solution4089
381Next Greater Element III LeetCode Solution4086
382Check whether Strings are K Distance Apart or Not4086
3833 Sum4085
384K Empty Slots LeetCode4085
3854Sum4084
386Find the First and Second Smallest Elements4078
387Longest Substring with At Most K Distinct Characters LeetCode Solution4068
388Check if a given array contains duplicate elements within k distance from each other4058
389Minimum Cost to Hire K Workers4052
390Max stack4049
391Substring with Concatenation of All Words Leetcode Solution4047
392LRU Cache Implementation4044
393Implementation of Deque using circular array4035
394Longest subarray not having more than K distinct elements4030
395Word Search4029
396Graph Valid Tree LeetCode Solution4024
397Sort a stack using a temporary stack4013
398Invert Binary Tree LeetCode Solution4004
399Minimize Maximum Pair Sum in Array LeetCode Solution4004
400Regular Expression Matching Regular Expression Matching LeetCode Solution4003
401Sliding Window Technique4003
402Stack Permutations (Check if an array is stack permutation of other)3992
403Permutation Sequence LeetCode Solution3987
404Stone Game II Leetcode3987
405Longest subsequence such that difference between adjacents is one3985
406Find the Smallest Divisor given a Threshold Leetcode Solution3984
407Best Time to Buy and Sell Stock with Cooldown Leetcode Solution3979
408Non-decreasing Array LeetCode Solution3977
409Convert Sorted Array to Binary Search Tree LeetCode Solutions3976
410Design Browser History LeetCode Solution3969
411Find duplicates in a given array when elements are not limited to a range3968
412Find the subarray with least average3967
413Priority Queue using doubly linked list3966
414Number Complement Leetcode Solution3965
415Top View of Binary Tree3962
416Kth Smallest Element in a BST Leetcode Solution3961
417Missing Element in Sorted Array LeetCode Solution3954
418Minesweeper LeetCode Solution3953
419Queries for counts of array elements with values in given range3944
420Number of Islands II LeetCode Solution3942
421LRU Cache Leetcode Solution3941
422Painting Fence Algorithm3939
423K Closest Points to Origin Leetcode Solution3934
424Maximum Number of Occurrences of a Substring Leetcode Solution3934
425Nth Catalan Number3927
426Common elements in all rows of a given matrix3922
427Partition List Leetcode Solution3916
428Path With Maximum Minimum Value LeetCode Solution3910
429Find the Peak Element from an Array3907
430First Circular Tour to Visit all the Petrol Bunks3902
431Fibonacci Number LeetCode Solution3900
432Snakes and Ladders LeetCode Solution3897
433Maximum Consecutive Numbers Present in an Array3890
434Can Make Arithmetic Progression From Sequence Leetcode Solution3888
435Number of Smaller Elements on Right Side3885
436Find Top K (or Most Frequent) Numbers in a Stream3882
437Sequences of given length where every element is more than or equal to twice of previous3881
438Sliding Window Maximum LeetCode Solution3878
439Sort elements by frequency3870
440Find Maximum Level sum in Binary Tree3867
441Combination Sum IV LeetCode Solution3866
442Gold Mine Problem3859
443Tiling Problem3858
444Integer Break LeetCode Solution3856
445Flood Fill LeetCode3856
446High Five LeetCode Solution3849
447Insert Interval Leetcode Solution3845
448Odd Even Linked List Leetcode Solution3843
449Search a 2D Matrix II Leetcode Solution3840
450Check if Two given Strings are Isomorphic to each other3838
451Count items common to both the lists but with different prices3836
452Find Minimum in Rotated Sorted Array II LeetCode Solution3832
453Move All the Zeros to the End of the Given Array3831
454N queen problem3824
455Rearrange array such that even positioned are greater than odd3823
456Distance of nearest cell having 1 in a binary matrix3821
457Shortest Palindrome3821
458Longest Palindrome can be Formed by Removing or Rearranging Characters3814
459Interval Tree3795
460Insert into a Binary Search Tree Leetcode Solution3793
461Consecutive Characters LeetCode Solution3792
462Replace Elements with Greatest Element on Right Side Leetcode Solution3790
463Trapping Rain Water LeetCode Solution3785
464Search in a Binary Search Tree Leetcode Solution3784
465Sort Colors3779
466Number of Closed Islands Leetcode Solution3770
467Design a stack that supports getMin() in O(1) time and O(1) extra space3766
468Kth Non-repeating Character3765
469Fibonacci numbers3763
470Longest Common Prefix using Sorting3755
471Find a Peak Element II LeetCode Solution3754
472Reverse a linked list3751
473Integer to English words3745
474Spiral Matrix III LeetCode Solution3742
475Find All Possible Recipes from Given Supplies LeetCode Solution3739
476Minimum Absolute Difference in BST Leetcode Solution3739
477Queries for GCD of all numbers of an array except elements in a given range3733
478Evaluate Reverse Polish Notation LeetCode Solution3731
479Decompress Run-Length Encoded List Leetcode Solution3730
480Expression Contains Redundant Bracket or Not3730
481Sliding Window Median Leetcode Solution3722
482Check If Array Pairs Are Divisible by k LeetCode Solution3722
483Vertical Order Traversal of Binary Tree LeetCode Solution3713
484Convert Sorted Array to Binary Search Tree Leetcode Solution3710
485Find Pythagorean Triplets from Array3707
486Coin Change Problem3706
487Restore IP Addresses Leetcode Solution3705
488Sorting array using Stacks3700
489Binary Tree Maximum Path Sum LeetCode Solution3698
490Palindrome Substring Queries3696
491Minimum Path Sum3695
492Morris Traversal3674
493Sort an array according to the order defined by another array3671
494Balanced Expression with Replacement3671
495Multiplication of Two Matrices3669
496Majority Element3667
497Priority Queue in C++3662
498Rearrange an array in order – smallest, largest, 2nd smallest, 2nd largest3658
499Subset sum problem3652
500Camelcase Matching Leetcode Solution3646
501Best Time to Buy and Sell Stock3645
502Find the first Repeating Number in a Given Array3636
503Queue using Stacks3628
504Number of Days Between Two Dates LeetCode Solution3627
505Find Median from Data Stream LeetCode Solution3622
506Minimum Number of Taps to Open to Water a Garden LeetCode Solution3620
507Cells with Odd Values in a Matrix LeetCode Solution3615
508Path Crossing Leetcode Solution3607
509How to Implement Stack Using Priority Queue or Heap?3607
510Design Hit Counter LeetCode Solution3600
511Generate all Binary Strings from Given Pattern3599
512The Stock Span Problem3594
513Kth ancestor of a node in binary tree3586
514Count subarrays having total distinct elements same as original array3583
515Is Graph Bipartite? LeetCode Solution3582
516Sieve of Eratosthenes3580
517Detect a loop in the Linked List3579
518Path Sum II LeetCode Solution3578
519Intersection of Two Linked Lists LeetCode Solution3571
520Analyze User Website Visit Pattern LeetCode Solution3570
521Longest Increasing Path in a Matrix LeetCode Solution3569
522Shortest Completing Word Leetcode Solution3567
523Find a Fixed Point in a Given Array3566
524Pancake Sorting Problem3564
525Divide Chocolate LeetCode Solution3559
526Count Submatrices With All Ones LeetCode Solution3555
527Letter Case Permutation3555
528Monotonic Array Leetcode Solution3550
529Largest rectangular sub-matrix whose sum is 03543
530Check if Array Contains Contiguous Integers With Duplicates Allowed3539
531Custom Sort String Leetcode Solution3538
532Construction of Longest Increasing Subsequence (N log N)3535
533Group Anagrams3533
534Minimum Height Trees3528
535Implement strStr() LeetCode Solution3525
536Maximum Element in an Array which is Increasing and then Decreasing3522
537Best Time to Buy and Sell Stock with Transaction Fee Leetcode Solution3520
538Decode Ways3519
539Different Ways to Add Parentheses Leetcode Solution3514
540Determine Whether Matrix Can Be Obtained By Rotation LeetCode Solution3508
541Merge Overlapping Intervals3507
542Valid Boomerang Leetcode Solution3504
543Find maximum length Snake sequence3496
544Queue based approach for first non-repeating character in a stream3490
545Nearest Exit from Entrance in Maze LeetCode Solution3483
546Number of Distinct Islands Leetcode Solution3475
547Scramble String LeetCode Solution3474
548How to Create Mergable Stack?3472
549Perfect Squares LeetCode Solution3470
550Find the Lost Element From a Duplicated Array3469
551Best Time to Buy and Sell Stock IV LeetCode Solution3468
552Shifting Letters LeetCode Solution3467
553Decode String3467
554Implement Trie (Prefix Tree) Leetcode Solution3461
555LCS (Longest Common Subsequence) of three strings3454
556Guess Number Higher or Lower II3445
557First missing positive3444
558Sliding Window Maximum3443
559Longest Common Prefix using Divide and Conquer3443
560Design Skiplist LeetCode Solution3441
561Most Stones Removed with Same Row or Column LeetCode Solution3440
562Reorder Data in Log Files LeetCode Solution3440
563Number of Equivalent Domino Pairs Leetcode Solution3440
564Maximum Sum of Non Consecutive Elements3439
565Sort a stack using recursion3437
566Champagne Tower LeetCode Solution3432
567Count Possible Triangles3429
568Find if an Expression has Duplicate Parenthesis or Not3427
569Recover Binary Search Tree3424
570Build an Array With Stack Operations Leetcode Solution3422
571Race Car LeetCode Solution3421
572Binary Tree zigzag level order Traversal3421
573All Possible Full Binary Trees LeetCode Solution3415
574Contiguous Array LeetCode Solution3415
575Rectangle Overlap LeetCode Solution3412
576Insert Node in the Sorted Linked List3411
577Largest Subarray with Equal Number of 0’s and 1’s3410
578Smallest Good Base3393
579Maximum Length of Chain Pairs3393
580Make Two Arrays Equal by Reversing Sub-arrays Leetcode Solution3387
581Minimum Bracket Reversals3383
582Find the two Numbers with Odd Occurrences in an Unsorted Array3374
583Palindrome Permutation LeetCode Solution3369
584Group Multiple Occurrence of Array Elements Ordered by first Occurrence3362
585Longest Substring with At Least K Repeating Characters LeetCode Solution3361
586Minimum Height Trees LeetCode Solution3357
587Maximum Depth of N-ary Tree Leetcode Solution3357
588Maximum Number of Ways to Partition an Array LeetCode Solution3356
589Longest Repeated Subsequence3355
590Rearrange Spaces Between Words Leetcode Solution3353
591Design a Stack With Increment Operation Leetcode Solution3350
592Distance Between Bus Stops Leetcode Solution3350
593Find a Sorted Subsequence of size 33350
594Recover Binary Search Tree Leetcode Solution3347
595Palindrome Partitioning Leetcode Solution3340
596Merge Two Binary Trees LeetCode Solution3340
597Find the Town Judge LeetCode Solution3339
598Implement Two Stacks in an Array3338
599Valid Parentheses Leetcode Solution3332
600K-th Distinct Element in an Array3332
601Subarrays with K Different Integers Leetcode Solution3331
602Reorder an Array According to the Given Indexes3331
603Lowest Common Ancestor of a Binary Search Tree Leetcode Solution3324
604Print all Palindromic Partitions of a String3323
605Heap Sort3321
606Check for Balanced Parentheses in an Expression3314
607Huffman Coding3308
608Maximum sum rectangle in a 2D matrix3299
609Find the First Circular Tour that visits all the Petrol Pumps3298
610Minimum number of jumps to reach end3295
611Maximum Score After Splitting a String Leetcode Solution3293
612Count pair with Given Sum3281
613Contains Duplicate3281
614The Maze III LeetCode Solution3279
615Jump Game IV LeetCode Solution3278
616Sort a String According to Another String3278
617Merge Overlapping Intervals II3278
618Mean of Array After Removing Some Elements Leetcode Solution3273
619Maximize Elements Using Another Array3272
620Perform String Shifts Leetcode3269
621Palindrome Permutation3257
622Find First and Last Position of Element in Sorted Array LeetCode Solution3249
623Word Break3246
624Valid Sudoku3239
625Palindrome Permutations of a String3235
626Find the Minimum Element in a Sorted and Rotated Array3235
627Convert BST to Min Heap3230
628All Unique Triplets that Sum up to a Given Value3222
629Find Largest Value in Each Tree Row LeetCode Solution3219
630Minimum Jumps to Reach Home LeetCode Solution3217
631Possible Bipartition LeetCode Solution3215
632A Space Optimized DP solution for 0-1 Knapsack Problem3215
633Caesar Cipher3215
634Iterative Method to find Height of Binary Tree3213
635Find all triplets with zero sum3212
636Edit Distance LeetCode Solution3206
637Count Sub Islands LeetCode Solution3200
638Find Median from data Stream3190
639Palindromic Substrings Leetcode Solution3183
640My Calendar I LeetCode Solution3183
641Segregate 0s and 1s in an Array3178
642Reach a Number LeetCode Solution3172
643Best Meeting Point LeetCode Solution3163
644Find the Subarray of given length with Least Average3161
645Maximum Product of Splitted Binary Tree LeetCode Solution3160
646Number of palindromic paths in a matrix3159
647Level order Traversal in Spiral Form3159
648Merge Two Balanced Binary Search Trees3147
649Count Good Nodes in Binary Tree LeetCode Solution3142
650Pair with given product3142
651Check if the given array can represent Level Order Traversal of Binary Search Tree3139
652Word Pattern3137
653Rearrange Array such that arr[i] >= arr[j] if i is even and arr[i] <= arr[j] if i is odd and j < i3135
654Alien Dictionary3133
655Breadth First Search (BFS) for a Graph3130
656Validate Binary Search Tree3118
657Partition Problem3116
658Isomorphic Strings LeetCode Solution3107
659Brick Wall LeetCode Solution3105
660Convert Sorted List to Binary Search Tree3100
661Sorted Linked List to Balanced BST3099
662Number of Subsequences That Satisfy the Given Sum Condition LeetCode solution3093
663Find whether a subarray is in form of a mountain or not3089
664Minimum time required to rot all oranges3086
665Add two numbers3085
666Swapping Nodes in a Linked List Leetcode Solution3082
667Maximize Sum of Array after K Negations Leetcode Solution3081
668Construct BST from given Preorder Traversal3081
669How to Efficiently Implement k Stacks in a Single Array?3078
670Sort 0s 1s and 2s in an Array3075
671Shortest Path in a Grid with Obstacles Elimination LeetCode Solution3074
672Rotate Array3070
673Populating Next Right Pointers in Each Node3068
674Largest Sum Contiguous Subarray3066
675Longest Subarray Having Count of 1s One More than Count of 0s3064
676Queries on Probability of Even or Odd Number in given Ranges3063
677Bubble sort using two Stacks3063
678Remove brackets from an algebraic string containing + and – operators3061
679Merge K Sorted Arrays and Print Sorted Output3061
680Print Fibonacci sequence using 2 variables3056
681Find all pairs (a, b) in an array such that a % b = k3050
682Range Sum Query 2D – Immutable LeetCode Solution3046
683Find Zeros to be Flipped so that Number of Consecutive 1’s is Maximized3044
684Find four elements that sum to a given value (Hashmap)3043
685Count ways to reach the nth stair using step 1, 2 or 33035
686Maximum Number of Chocolates to be Distributed Equally Among k Students3034
687Count Distinct Elements in Every Window of Size K3033
688Filter Restaurants by Vegan-Friendly, Price and Distance Leetcode Solution3026
689Merge Two Sorted Lists Leetcode3018
690Maximum Frequency Stack Leetcode Solution3016
691Detect Capital Leetcode Solution3007
692Minimum Swaps to Group All 1’s Together Leetcode Solution3004
693Difference Array | Range update query in O(1)2993
694Split Array Into Consecutive Subsequences2993
695Partition Equal Subset Sum2993
696Binary Tree Right Side View LeetCode Solution2990
697Counting Bits2988
698Remove duplicates from sorted array2985
699Contiguous Array Leetcode2985
700Remove Palindromic Subsequences Leetcode Solution2983
701Binary Tree to Binary Search Tree Conversion2980
702Partition to K Equal Sum Subsets Leetcode Solution2979
703Print all subarrays with 0 sum2975
704Check if a Linked list of Strings form a Palindrome2974
705Topological Sorting2973
706Happy Number2962
707Length of Longest Fibonacci Subsequence2961
708Minimum Sum Path in a Triangle2954
709Elements Appear more than N/K times in Array2953
710Find pairs with given sum such that elements of pair are in different rows2945
711Minimum Swaps to Make Strings Equal Leetcode Solution2944
712Concatenation of Array LeetCode Solution2939
713Populating Next Right Pointers in Each Node Leetcode Solution2939
714Arithmetic Slices II – Subsequence LeetCode Solution2936
715Minimum Number of Arrows to Burst Balloons LeetCode Solution2931
716Reverse Nodes in K-Group2927
717Find All Pairs With a Given Difference2925
718String comparison containing wildcards2924
719MiniMax Algorithm2923
720Inorder Successor of a node in Binary Tree2918
721Web Crawler LeetCode Solution2917
722An Interesting Method to generate Binary Numbers from 1 to n2915
723Queue Reconstruction by Height2914
724Increasing Subsequence of Length three with Maximum Product2890
725Score of Parenthesis LeetCode Solution2885
726Maximum Distance in Array2883
727Root to Leaf path with target sum Leetcode Solutions2882
728Swap Kth Node from beginning with Kth Node from End2881
729Given a binary tree, how do you remove all the half nodes?2879
730Longest Increasing Subsequence2875
731Finding K closest element2866
732Find Duplicate Subtrees2859
733Union and Intersection of two Linked Lists2858
734Longest Common Prefix Using Binary Search II2857
735Iterative Preorder Traversal2855
736Climbing stairs2855
737Delete Nth node from the end of the given linked list2854
738Check if String Follows Order of Characters by a Pattern or not2849
739BFS vs DFS for Binary Tree2839
740Pancake Sorting2839
741Find K Closest Elements LeetCode Solution2828
742Construct Binary Tree from given Parent Array representation2828
743Maximum Product Subarray II2825
744Find the first repeating element in an array of integers2824
745Container with Most Water2822
746Symmetric Tree2821
747Parallel Courses II LeetCode Solution2816
748Count Minimum Steps to Get the given Array2813
749Deletion in a Binary Tree2802
750Find the Difference Leetcode Solution2798
751Construct Binary Tree from Preorder and Postorder Traversal LeetCode Solution2796
752Delete Nodes and Return Forest Leetcode Solution2786
753Check if all levels of two Binary Tree are anagrams or not2786
754Nested List Weight Sum II LeetCode Solution2785
755Rearrange an Array Such that arr[i] is equal to i2781
756Level order traversal using two Queues2780
757Substring With Concatenation Of All Words2775
758Minimum Cost to Move Chips to The Same Position LeetCode Solution2773
759Find Maximum of Minimum for Every Window Size in a Given Array2772
760Tree Traversal (Preorder, Inorder & Postorder)2772
761Sum Root to Leaf Numbers LeetCode Solution2771
762Level of Each node in a Tree from source node2771
763Kill Process LeetCode Solution2766
764Minimum Size Subarray Sum2762
765Boundary Traversal of binary tree2761
766Super Ugly Number2761
767Sort Array by Increasing Frequency Leetcode Solution2759
768Count pairs from two linked lists whose sum is equal to a given value2759
769Linked List Cycle2753
770Minimum Remove to Make Valid Parentheses LeetCode Solution2750
771Non-overlapping sum of two sets2750
772Iterative Depth First Traversal of Graph2750
773Reorder Array Using Given Indexes2748
774Check if any two intervals overlap among a given set of intervals2744
775K maximum sums of overlapping contiguous sub-arrays2744
776Matrix Chain Multiplication2742
777New 21 Game2738
778Valid Anagrams2735
779Flatten Binary Tree to Linked List LeetCode Solution2734
780Merging Intervals2734
781Remove Duplicates from Sorted List II2731
782Maximum size subarray sum equals k2728
783Sum of f(a[i], a[j]) over all pairs in an array of n integers2727
784Longest Common Prefix Word by Word Matching2723
785Reservoir Sampling2722
786Merge K Sorted Linked Lists2715
787Palindrome Partitioning2712
788Range LCM Queries2711
789Sorting a K Sorted Array2700
790Print a Binary Tree in Vertical Order2699
791The Painter’s Partition Problem2697
792Balanced Binary Tree2697
793Hamming Distance2696
794Missing Number2686
795Maximum Product Subarray2676
796Peak Index in a Mountain Array LeetCode Solution2675
797Maximum difference between two elements such as larger element comes after smaller2672
798Create Maximum Number2671
799Iterative Postorder Traversal Using Two Stacks2668
800Valid Triangle Number LeetCode Solution2663
801Check if Two Expressions With Brackets are Same2663
802Check if a queue can be sorted into another queue using a stack2659
803Friends Of Appropriate Ages LeetCode Solution2658
804Defanging an IP Address LeetCode Solution2655
805Find Maximum Sum Possible Equal Sum of Three Stacks2655
806Lowest Common Ancestor2654
807Verify Preorder Serialization of a Binary Tree2651
808Find Three Element From Different Three Arrays Such That a + b + c = sum2647
809Count number of triplets with product equal to given number2643
810Sort Elements by Frequency II2641
811Minimum insertions to form a palindrome with permutations allowed2640
812Find Sum of all unique sub-array sum for a given array2639
813Find Element Using Binary Search in Sorted Array2639
814Find distance between two nodes of a Binary Tree2637
815Unique Binary Search Trees LeetCode Solution2634
816Maximum difference between frequency of two elements such that element having greater frequency is also greater2632
817Check if a given array can represent Preorder Traversal of Binary Search Tree2632
818Valid Triangle Number LeetCode Solution2631
819Vertical sum in a given binary tree2631
820Find subarray with given sum (Handles Negative Numbers)2628
821Newman-Conway Sequence2626
822Smallest Range II Leetcode Solution2622
823Merging Two Sorted Arrays2614
824Check if two nodes are on the same path in a Tree2608
825Number Of Longest Increasing Subsequence2608
826Find K Length Subarray of Maximum Average2607
827Minimum Distance Between BST Nodes Leetcode Solution2606
828Largest Submatrix With Rearrangements LeetCode Solution2605
829Maximum subsequence sum such that no three are consecutive2599
830First Bad Version2598
831Segment Tree2596
832Third Maximum Number Leetcode Solution2595
833Check Completeness of a Binary Tree LeetCode Solution2594
834Print all triplets in sorted array that form AP2594
835Find Common Characters Leetcode Solution2587
836Print All Distinct Elements of a Given Integer Array2585
837Maximum number of segments of lengths a, b and c2583
838Flatten 2D Vector LeetCode Solution2581
839Products of ranges in an array2580
840Arrange given numbers to form the biggest number2580
841Range Sum Query using Sparse Table2578
842Lower Case To Upper Case2574
843Largest subarray with equal number of 0s and 1s2573
844Find Smallest Range Containing Elements from k Lists2572
845Longest Bitonic Subsequence2570
846Kth Smallest Element in a Sorted Matrix LeetCode Solution2563
847Diagonal Traversal of Binary Tree2562
848Closest Leaf in a Binary Tree LeetCode Solution2560
849Find Peak Element2554
850Stone Game IV LeetCode Solution2552
851Employee Importance LeetCode Solution2552
852Valid Parenthesis String2552
853Trapping Rain Water II LeetCode Solution2551
854Array Nesting Leetcode Solution2550
855Find Nth Node2544
856Maximum Population Year LeetCode Solution2542
857Median of Two Sorted Arrays2541
858Contiguous Array2538
859Print Right View of a Binary Tree2538
860Compare Strings by Frequency of the Smallest Character Leetcode Solution2535
861Bottom View of a Binary Tree2530
862Distinct Subsequences2528
863Write a function to get the intersection point of two Linked Lists2526
864Longest Palindromic Subsequence2526
865Largest divisible pairs subset2522
866Largest BST Subtree LeetCode Solution2519
867Infix to Postfix2518
868Shuffle an Array2513
869Path Sum2503
870Four Elements that Sum to Given2501
871Number of siblings of a given Node in n-ary Tree2500
872Stone Game IV LeetCode Solution2494
873Count and Say2493
874Isomorphic Strings2493
875Subset Sum Problem in O(sum) space2491
876Binary array after M range toggle operations2489
877Find the largest multiple of 32486
878Permutations of a Given String Using STL2485
879Merge Two Sorted Arrays2483
880Unique Binary Search Trees2480
881Red-Black Tree Introduction2476
882Minimum Swaps To Make Sequences Increasing LeetCode Solution2471
883Closest Binary Search Tree Value Leetcode Solution2470
884Height of a generic tree from parent array2469
885Maximum Side Length of a Square with Sum Less than or Equal to Threshold LeetCode Solution2461
886Friends Pairing Problem2459
887The Number of Weak Characters in the Game LeetCode Solution2458
888Next Greater Element in an Array2458
889Maximum Product Subarray2452
890Find Largest d in Array such that a + b + c = d2450
891Count Primes in Ranges2445
892Sentence Screen Fitting LeetCode Solution2438
893Valid Perfect Square LeetCode Solution2437
894Valid Number2433
895Range Minimum Query (Square Root Decomposition and Sparse Table)2430
896Encoded String With Shortest Length LeetCode Solution2424
897Rearrange an array such that ‘arr[j]’ becomes ‘i’ if ‘arr[i]’ is ‘j’2424
898Insert Delete GetRandom2424
899Transform a BST to Greater sum Tree2421
900Print n terms of Newman-Conway Sequence2420
901Averages of Levels in Binary Tree2419
902Find unique character in a string2405
903Shuffle a given Array2397
904Binary Search Tree Delete Operation2396
905Maximum Sum of 3 Non-Overlapping Subarrays2394
906Edit Distance2390
907Step-By-Step Directions From a Binary Tree Node to Another LeetCode Solution2389
908Binary Tree Longest Consecutive Sequence LeetCode Solution2384
909Convert BST into a Min-Heap without using array2384
910Minimum sum of squares of character counts in a given string after removing k characters2379
911Integer to Roman2378
912Reorganize String2371
913Serialize and Deserialize Binary Tree LeetCode Solution2370
914Orderly Queue LeetCode Solution2370
915Maximum Product Subarray2366
916Range Queries for Longest Correct Bracket Subsequence2365
917Next greater element2357
918Find Minimum In Rotated Sorted Array2356
919Serialize and Deserialize Binary Tree2354
920Kth Smallest Number in Multiplication Table Leetcode Solution2351
921Koko Eating Bananas LeetCode Solution2346
922Lowest Common Ancestor in Binary Search Tree2346
923Find the smallest binary digit multiple of given number2344
924K’th Largest element in BST using constant extra space2344
925Next Greater Element II LeetCode Solution2341
926Array Queries for multiply replacements and product2341
927Bold Words in String LeetCode Solution2339
928Swap Nodes In Pairs2335
929Diameter of N-Ary Tree LeetCode Solution2322
930Maximum Sum Increasing Subsequence2321
931K’th Largest Element in BST when modification to BST is not allowed2313
932Moving Stones Until Consecutive Leetcode Solution2310
933Constant time range add operation on an array2304
934Advantages of BST over Hash Table2304
935Insert into a Sorted Circular Linked List LeetCode Solution2303
936Write Code to Determine if Two Trees are Identical2300
937Design Underground System Leetcode Solution2294
938Valid Tic-Tac-Toe State LeetCode Solution2285
939Best Meeting Point LeetCode Solution2281
940Queries on XOR of greatest odd divisor of the range2267
941Reverse a Path in BST using Queue2266
942Check if an Array is Stack Sortable2266
943Longest Increasing Consecutive Subsequence2263
944Power of Two2261
945Number of elements less than or equal to a given number in a given subarray2255
946Numbers with prime frequencies greater than or equal to k2253
947Total Hamming Distance LeetCode Solution2251
948Check if X can give change to every person in the Queue2244
949Check if each internal node of a BST has exactly one child2244
950Number of Orders in the Backlog Leetcode Solution2242
951Form minimum number from given sequence2240
952Find the node with minimum value in a Binary Search Tree2239
953Greatest Sum Divisible by Three LeetCode Solution2238
954Clone a Binary Tree with Random Pointers2238
955Level Order Traversal of Binary Tree2238
956Image Overlap LeetCode Solution2236
957Maximum Array from Two given Arrays Keeping Order Same2233
958A program to check if a binary tree is BST or not2231
959Count the Pairs at Same Distance as in English Alphabets2231
960Find minimum number of merge operations to make an array palindrome2229
961Design Add and Search Words Data Structure LeetCode Solution2228
962Graph Cloning2223
963Merge Sort2217
964Count and Toggle Queries on a Binary Array2212
965Factorial Trailing Zeroes LeetCode Solution2211
966Collect maximum points in a grid using two traversals2208
967Closest Binary Search Tree Value II LeetCode Solution2204
968Form Minimum Number From Given Sequence2202
969Largest Plus Sign Leetcode Solution2196
970Check for Palindrome after every character replacement Query2195
971Merge two BSTs with limited extra space2195
972Print Next Greater Number of Q queries2191
973Group Shifted Strings Leetcode Solution2187
974Dividing Array into Pairs With Sum Divisible by K2186
975Merge Sorted Array2186
976Queries for Decimal Values of Subarrays of a Binary Array2185
977Print all Possible Ways to Break a String in Bracket Form2184
978Maximum difference between first and last indexes of an element in array2183
979Print Ancestors of a Given Binary Tree Node Without Recursion2163
980Priority Queue2157
981Excel Sheet Column Number LeetCode Solution2153
982Print modified array after multiple array range increment operations2147
983Count even length binary sequences with same sum of first and second half bits2143
984Longest Substring Without Repeating Characters Leetcode Solution2139
985Binary Search Tree2135
986Palindrome Partitioning2131
987Guess The Word2131
988Swim in Rising Water LeetCode Solution2129
989Minimum Moves to Equal Array Elements LeetCode Solution2125
990Cutting a Rod2119
991Find postorder traversal of BST from preorder traversal2112
992Kth Smallest Element in a BST2107
993Excel Sheet Column Title LeetCode Solution2101
994Unique Paths II2094
995Count Pairs Whose Products Exist in Array2091
996Insert Delete GetRandom O(1) – Duplicates allowed LeetCode Solution2079
997Find maximum average subarray of k length2077
998How to print maximum number of A’s using given four keys2076
999Regular Expression Matching2074
1000Binary Search Tree Search and Insertion2073
1001Longest Common Prefix using Character by Character Matching2058
1002Check given array of size n can represent BST of n levels or not2056
1003Sum of Left Leaves LeetCode Solution2053
1004K Empty Slots2047
1005Sorted Array to Balanced BST2026
1006Queries for Number of Distinct Elements in a Subarray2017
1007Minimum Possible Integer After at Most K Adjacent Swaps On Digits LeetCode Solution2015
1008Decrease Elements To Make Array Zigzag LeetCode Solution2002
1009Maximum Depth Of Binary Tree2002
1010Iterative method to find ancestors of a given binary tree1991
1011Find the Town Judge LeetCode Solution1978
1012Construct Complete Binary Tree from its Linked List Representation1976
1013Shortest Unsorted Continuous Subarray LeetCode Solution1967
1014Find Maximum Depth of Nested Parenthesis in a String1964
1015Binary Tree to Binary Search Tree Conversion using STL set1948
1016Maximum weight transformation of a given string1946
1017Symmetric Tree LeetCode Solution Leetcode Solution1928
1018Data Structure Designing1914
1019Random Pick Index LeetCode Solution1913
1020Search in Sorted Rotated Array1900
1021Convert a BST to a Binary Tree such that sum of all greater keys is added to every key1873
1022Search an Element in Sorted Rotated Array1857
1023Kth Smallest Product of Two Sorted Arrays LeetCode Solution1856
1024Next Greater Element I Leetcode Solution1854
1025Minimum Number of Operations to Move All Balls to Each Box LeetCode Solution1839
1026Print Maximum Length Chain of Pairs1837
1027Flatten Binary Tree to Linked List LeetCode Solution1814
1028Maximum Binary Tree1796
1029Find k-th smallest element in BST (Order Statistics in BST)1759
1030Peeking Iterator LeetCode Solution1753
1031Find Two Non-overlapping Sub-arrays Each With Target Sum LeetCode Solution1706
Translate »