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 Solution43768
2Maximum occurring character in a string19861
3Plus One Leetcode Solution19517
4Valid Parentheses LeetCode Solution19355
53Sum Leetcode Solution17570
6Merge Sorted Arrays Leetcode Solution15466
7First Repeating Element15326
8Single Number Leetcode Solution15004
9Count Primes Leetcode Solutions14797
10Pow(x, n) Leetcode Solution14670
11Sqrt(x) Leetcode Solution14449
12Meeting Rooms II LeetCode Solution13477
13Concatenation of Array LeetCode Solution12957
14Roman to Integer Leetcode Solution12112
15Valid Palindrome Leetcode Solution11961
16Contains Duplicate II Leetcode Solution11864
17Search Insert Position Leetcode Solution11861
18Palindrome Number LeetCode Solution11685
19Remove Duplicates from Sorted Array Leetcode Solution11555
20Jump Game Leetcode Solution11286
21Reverse Vowels of a String Leetcode Solution11260
22Number of Good Pairs Leetcode Solution11213
23Longest Substring Without Repeating Characters LeetCode Solution11205
24Intersection of Two Arrays II Leetcode Solution11186
25Spiral Matrix LeetCode Solution10958
26Kids With the Greatest Number of Candies Leetcode Solution10874
27House Robber Leetcode Solution10870
28Add Binary Leetcode Solution10746
29Maximum Subarray Leetcode Solution10395
30Number Of 1 bits10288
31Find the Maximum Repeating Number in Array10124
32Text Justification LeetCode Solution10019
33Move Zeroes LeetCode Solution9919
34Jewels and Stones Leetcode Solution9900
35Min Stack Leetcode Solution9862
36Power of Two Leetcode Solution9644
37Longest Palindromic Substring LeetCode Solution9639
38Permutations Leetcode Solution9590
39Shuffle String Leetcode Solution9590
40Word Search Leetcode Solution9464
41Third Maximum Number Leetcode Solution9445
42Evaluation of Postfix Expression9417
43Daily Temperatures Leetcode Solution9413
44Find All Numbers Disappeared in an Array Leetcode Solution9376
45Median of Two Sorted Arrays LeetCode Solution9339
46Next Permutation Leetcode Solution9296
47Search in Rotated Sorted Array Leetcode Solution9267
48Number of Islands LeetCode Solution9162
49Kth Missing Positive Number Leetcode Solution9155
50Maximum Profit in Job Scheduling Leetcode Solution9145
51Next Greater Element I Leetcode Solution9067
52Longest Common Prefix Leetcode Solution9029
53Frog Jump Leetcode Solution8878
54Valid Anagram Leetcode Solution8806
55Find Minimum Distance Between Two Numbers in an Array8727
56Running Sum of 1d Array Leetcode Solution8716
57Shuffle the Array Leetcode Solution8683
58Rotate Image LeetCode Solution8645
59Multiply Strings Leetcode Solution8608
60Combination Sum Leetcode Solution8587
61Can Place Flowers LeetCode Solution8577
62House Robber II Leetcode Solution8528
63Count and Say Leetcode Solution8513
643Sum Closest LeetCode Solution8444
65Bulb Switcher LeetCode Solution8413
66Koko Eating Bananas Leetcode Solution8291
67Best Time to Buy and Sell Stock LeetCode Solution8275
68Subarray and Subsequence8226
69Excel Sheet Column Title Leetcode Solution8224
70Happy Number Leetcode Solution8207
71Isomorphic Strings Leetcode Solution8166
72Majority Element Leetcode Solution8124
73Candy LeetCode Solution8111
74Missing Number Leetcode Solution8089
75Integer to Roman Leetcode Solution8067
76Count Pairs With Given Sum8065
77Product of array except self7981
78A Product Array Puzzle7951
79Rotate String LeetCode Solution7946
80Strobogrammatic Number LeetCode Solution7904
81Binary Search LeetCode Solution7825
82Reverse String Without Temporary Variable7824
83Is Subsequence Leetcode Solution7807
84Find the Difference Leetcode Solution7764
85Find the Duplicate Number LeetCode Solution7757
86Expression Evaluation7752
87Largest Number Leetcode Solution7727
88Find Common Characters Leetcode Solution7720
89Subtract the Product and Sum of Digits of an Integer Leetcode Solution7601
90String to Integer (atoi) LeetCode Solution7568
91Subset Leetcode7565
92Rabin Karp Algorithm7533
93How Many Numbers Are Smaller Than the Current Number Leetcode Solution7514
94Summary Ranges Leetcode Solution7457
95Set Matrix Zeroes7430
96Boolean Parenthesization Problem7428
97Balanced Binary Tree Leetcode Solution7382
98Word Pattern LeetCode Solution7359
99Sort Characters By Frequency LeetCode Solution7337
100Find the Town Judge Leetcode Solution7325
101Find the Winner of the Circular Game LeetCode Solution7288
102Unique Paths Leetcode Solution7285
103Arranging Coins Leetcode Solution7268
104Rearrange Positive and Negative Numbers Alternatively in Array7224
105Group Anagrams LeetCode Solution7171
106Postfix to Infix Conversion7165
107String Compression LeetCode Solution7137
108Asteroid Collision LeetCode Solution7086
109Page Replacement Algorithms in Operating Systems7051
110Repeated Substring Pattern LeetCode Solution7011
111Smallest window in a string containing all characters of another string6990
112Best Time to Buy and Sell Stock  II Leetcode Solution6948
113Sort Colors LeetCode Solution6940
114Matrix Chain Multiplication using Dynamic Programming6937
115Sort Array By Parity LeetCode Solution6796
116Zigzag Conversion LeetCode Solution6795
117Sum of minimum and maximum elements of all subarrays of size k6772
118Kth largest element in an Array Leetcode Solutions6768
119Valid Palindrome II Leetcode Solution6743
120Divide Two Integers Leetcode Solution6734
121Generate Parentheses Leetcode Solution6724
122Find the Row with Maximum Number of 1’s6665
123Decode String Leetcode Solution6657
124Assign Cookies Leetcode Solution6653
125Pascal Triangle Leetcode6635
126Reverse Integer Leetcode Solution6602
127Remove Duplicates from Sorted Array II Leetcode Solution6596
128Product of Array Except Self LeetCode Solution6586
129Length of Last Word Leetcode Solution6575
130H-Index Leetcode Solution6571
131Bus Routes Leetcode Solution6530
132Merge Two Sorted Lists Leetcode Solutions6493
133Number of Provinces Leetcode Solution6490
134Prefix to Infix Conversion6464
135Linked List Cycle II LeetCode Solution6416
136Convert array into Zig-Zag fashion6400
137Minimum Steps to reach target by a Knight6400
138Minimum Cost For Tickets Leetcode Solution6389
139Employee Free Time LeetCode Solution6373
140Defanging an IP Address Leetcode Solution6361
141Optimal Account Balancing LeetCode Solution6359
142Pascal’s Triangle II Leetcode Solution6312
143Find First and Last Position of Element in Sorted Array Leetcode Solution6262
144Bellman Ford Algorithm6214
145First element occurring k times in an array6207
146Implementation of Deque using Doubly Linked List6204
147Island Perimeter Leetcode Solution6202
148Increasing Triplet Subsequence LeetCode Solution6182
149OSI Model6177
150Merge Sorted Array LeetCode Solution6174
151Build Array From Permutation Leetcode Solution6163
152Majority Element II Leetcode Solution6140
153Robot Room Cleaner Leetcode Solution6130
154KMP Algorithm6109
155Max Consecutive Ones Leetcode Solution6095
156Find Pair with Given Difference6051
157Check if the Elements of an Array are Consecutive6049
158Swap Nodes in Pairs Leetcode Solutions6037
159K-th Smallest Element in a Sorted Matrix6027
160Set Matrix Zeroes Leetcode Solution6013
161Add Two Numbers II Leetcode Solution6008
162Find the Missing Number5979
163Guess Number Higher or Lower LeetCode Solution5963
164Lemonade Change Leetcode Solution5948
165Trapping Rain Water Leetcode Solution5938
166First negative integer in every window of size k5927
167Fibonacci Number LeetCode Solution5922
168Design Parking System Leetcode Solution5913
169Subarray Sum Equals K LeetCode Solution5911
170Delete middle element of a stack5886
171Word Ladder LeetCode Solution5865
172First Unique Character in a String LeetCode Solution5842
173Last Stone Weight5842
174Subarray with Given Sum5834
175Coin Change 2 Leetcode Solution5825
176Length of the largest subarray with contiguous elements5807
177Monotonic Array LeetCode Solution5803
178Find All Duplicates in an Array LeetCode Solution5796
179Capacity To Ship Packages Within D Days Leetcode Solution5795
180String Compression5790
181Subarray Product Less Than K LeetCode Solution5789
182Repeated Substring Pattern5767
183Form Minimum Number from Given Sequence of D’s and I’s5764
184Palindrome Linked List Leetcode Solution5759
185Single Element in a Sorted Array LeetCode Solution5734
186Find Smallest Missing Number in a Sorted Array5690
187Leetcode Permutations5653
188Continuous Subarray Sum LeetCode Solution5647
189Remove Duplicates from Sorted List II LeetCode Solution5641
19001 Matrix LeetCode Solution5641
191Prefix to Postfix Conversion5625
192Combinations Leetcode Solution5624
193Combination Sum5579
194Reverse Words in a String III LeetCode Solution5563
195Valid Perfect Square Leetcode Solution5557
196Iterative Implementation of Quick Sort5552
197Break a Palindrome LeetCode Solution5546
198Same Tree LeetCode Solution5534
199Remove Linked List Elements Leetcode Solution5495
200Merge k Sorted Lists Leetcode Solution5484
201Insert Delete GetRandom O(1) Leetcode Solution5482
202Rotate List Leetcode Solution5467
203Slowest Key Leetcode Solution5462
204Top K Frequent Elements LeetCode Solution5461
205Container With Most Water LeetCode Solution5454
206Relative Ranks Leetcode Solution5452
207Contains Duplicate LeetCode Solution5443
208Backspace String Compare5435
209Find Peak Element LeetCode Solution5409
210Cuckoo sequence program5400
211Maximum Product of Three Numbers LeetCode Solution5389
212Find the Duplicate Element5330
213Palindrome Number5326
214Subarray Sum Equals k5322
215Printing brackets in Matrix Chain Multiplication Problem5314
216The K Weakest Rows in a Matrix Leetcode Solution5300
217Kth Largest Element in a Stream Leetcode Solution5297
218Longest Common Subsequence LeetCode Solution5266
219Second Most Repeated Word in a Sequence5250
220Find Leaders in an Array5242
221Remove All Occurrences of a Substring LeetCode Solution5232
222Max Area of Island5232
223Rearrange given Array in Maximum Minimum Form5215
224Generate all Binary Strings Without Consecutive 1’s5209
225Relative Sort Array Leetcode Solution5199
226Unique Paths II Leetcode Solution5194
227Scramble String5194
228Arithmetic Expression Evaluation5181
229Permutation in String Leetcode Solution5180
230Target Sum5172
231Check If Two String Arrays are Equivalent Leetcode Solution5171
232Convert a Number to Hexadecimal Leetcode Solution5168
233Make The String Great Leetcode Solution5163
234Delete Node in a Linked List Leetcode Solution5134
235Letter Combinations of a Phone Number5121
236Time Based Key-Value Store LeetCode Solution5113
237N-Queens LeetCode Solution5109
238Find Triplet in Array With a Given Sum5107
239Moving Average from Data Stream Leetcode Solution5100
240Construct Binary Tree from Given Inorder and Preorder Traversals5096
241Count Good Nodes in Binary Tree Leetcode Solution5083
242Stone Game LeetCode5074
243Next Permutation5060
244LRU Cache LeetCode Solution5050
245Number of Dice Rolls With Target Sum LeetCode Solution5033
246Prim’s Algorithm5019
247Find N Unique Integers Sum up to Zero Leetcode Solution5017
248Check If N and Its Double Exist Leetcode Solution5010
249Minimum Operations to convert X to Y5006
250Min Stack4981
251Given two unsorted arrays find all pairs whose sum is x4978
252Number of Steps to Reduce a Number to Zero Leetcode Solution4972
253Remove Minimum Characters so that Two Strings Become Anagrams4970
254Flipping an Image LeetCode Solution4943
255Minimum swaps required to bring all elements less than or equal to k together4913
256Find The Duplicate Number4908
257Minimum Knight Moves LeetCode Solution4907
258Top K Frequent Elements4903
259Stock Buy Sell to Maximize Profit4898
260Min Cost Climbing Stairs LeetCode Solution4890
261Reverse Only Letters LeetCode Solution4879
262Student Attendance Record I Leetcode Solution4858
263Smallest Positive Number Missing in an Unsorted Array4851
264To Lower Case Leetcode Solution4828
265Maximum Sum Increasing Subsequence4824
266Single Number4818
267License Key Formatting Leetcode Solution4795
268The kth Factor of n Leetcode Solution4793
269Reverse words in a string4793
270Maximum Subarray Sum using Divide and Conquer4792
271Maximum Population Year LeetCode Solution4744
272Longest Common Subsequence4692
273Top K Frequent Words LeetCode Solution4690
274Find the Number Occurring Odd Number of Times in an Array4683
275Remove Nth Node From End of List Leetcode Solution4667
276Find Words That Can Be Formed by Characters Leetcode Solution4658
277BFS for Disconnected Graph4656
278Sudoku Solver4655
279Search Suggestions System LeetCode Solution4652
280Minimum Path Sum Leetcode Solution4650
281Special Array With X Elements Greater Than or Equal X Leetcode Solution4646
282Reformat Date LeetCode Solution4642
283Pairs of Songs With Total Durations Divisible by 60 LeetCode Solution4613
284Reveal Cards In Increasing Order Leetcode Solution4598
285Sum of Subarray Ranges Leetcode Solution4594
286Maximum Depth of Binary Tree Leetcode Solution4589
287Intersection of Two Arrays4572
288Sort Elements by Frequency of Occurrences4572
289Best Time to Buy and Sell Stock III Leetcode Solution4571
290N-th Tribonacci Number Leetcode Solution4556
291House Robber4548
292Maximum Size Subarray Sum Equals k Leetcode Solution4540
293Find any one of the multiple repeating elements in read only array4540
294Reverse Nodes in k-Group LeetCode Solution4539
295Diagonal Traverse LeetCode Solution4523
296Evaluate Division4520
297Maximize Distance to Closest Person LeetCode Solution4516
298Most Frequent Element in an Array4504
299Reverse individual words4498
300Remove All Ones With Row and Column Flips Leetcode Solution4497
301Minimum Characters to be Added at Front to Make String Palindrome4488
302Range Sum Query 2D – Immutable Leetcode Solution4486
303Length of Longest valid Substring4483
304Design A Leaderboard Leetcode Solution4481
305Find Index of Closing Bracket for a Given Opening Bracket in an Expression4477
306Binary Tree Inorder Traversal LeetCode Solution4471
307Find if Path Exists in Graph Leetcode Solution4467
308Last Stone Weight II LeetCode Solution4465
309Count of index pairs with equal elements in an array4462
310Count Number of Occurrences in a Sorted Array4460
311Remove Duplicates from Sorted List LeetCode Solution4444
312Minimum number of Merge Operations to make an Array Palindrome4438
313Split Linked List in Parts Leetcode Solution4415
314Implement a stack using single queue4415
315Partition Array Into Three Parts With Equal Sum Leetcode Solution4400
316Brightest Position on Street LeetCode Solution4382
317Find the Closest Palindrome number4373
318Dijkstra Algorithm4368
319Mobile Numeric Keypad Problem4356
320Find Leaves of Binary Tree LeetCode Solution4352
321Reverse Bits4338
322Spiral Matrix II Leetcode Solution4329
323Special Positions in a Binary Matrix Leetcode Solution4326
324Arrange given Numbers to Form the Biggest Number II4326
325Invalid Transactions LeetCode Solution4314
326Symmetric Tree Leetcode Solution4308
327Round Robin Scheduling4303
328Maximum Subarray4298
329Shortest Word Distance Leetcode Solution4296
330Paint House LeetCode Solution4291
331Sort Array By Parity II Leetcode Solution4244
332Find Duplicates in an Array in Most Efficient Way4240
333Diagonal Traversal LeetCode Solution4238
334Recursion4236
335One Edit Distance LeetCode Solution4231
336Maximal Square4227
337Hamming Distance Leetcode Solution4224
338Rank Transform of an Array Leetcode Solution4214
339Partition Labels LeetCode Solution4209
340Largest Rectangle in Histogram LeetCode Solution4198
341Remove Invalid Parentheses Leetcode Solution4198
342Minimum Moves to Equal Array Elements Leetcode Solution4195
343Binary Tree Zigzag Level Order Traversal LeetCode Solution4194
344Alien Dictionary LeetCode Solution4190
345Tug of War4190
346Jump Game4189
347Unique Paths4185
348String Matching in an Array Leetcode Solution4183
349Find Winner on a Tic Tac Toe Game Leetcode Solution4181
350Postfix to Prefix Conversion4153
351Minimum Time to Collect All Apples in a Tree LeetCode Solution4152
352Count of Triplets With Sum Less than Given Value4150
353The Celebrity Problem4143
354Next Permutation LeetCode Solution4129
355Validate Stack Sequences LeetCode Solution4125
356Bitwise AND of Numbers Range LeetCode Solution4125
357Merge Two Sorted Linked Lists4119
358Construct BST from its given Level Order Traversal4115
359Unique Paths III LeetCode Solution4114
360Range Sum of BST LeetCode Solution4112
361Lowest Common Ancestor of a Binary Tree Leetcode Solution4107
362Least Number of Unique Integers after K Removals Leetcode Solution4102
363Minimum Depth of Binary Tree Leetcode Solution4102
364Given an Array of Pairs Find all Symmetric Pairs in it4099
365Minimum operation to make all elements equal in array4097
366Smallest Subarray with k Distinct Numbers4094
367Transpose Graph4086
368Minimum Time Visiting All Points Leetcode Solution4080
369Invert Binary Tree LeetCode Solution4079
370Maximum Circular Subarray Sum4078
371Toeplitz Matrix4071
372Pair of Positive Negative Values in an Array4069
373Maximum Length of a Concatenated String with Unique Characters Leetcode Solution4066
374Longest Common Prefix using Trie4059
375Clone Graph LeetCode Solution4041
376Minimum Number of Steps to Make Two Strings Anagram Leetcode Solutions4039
377Check whether Strings are K Distance Apart or Not4039
378Robot Bounded In Circle LeetCode Solution4038
379Find minimum difference between any two elements4038
380Kruskal Algorithm4037
381Next Greater Element III LeetCode Solution4033
382Ugly Number II LeetCode Solution4030
3833 Sum4030
384K Empty Slots LeetCode4021
385Minimum Cost to Hire K Workers4016
386Longest Substring with At Most K Distinct Characters LeetCode Solution4014
387Substring with Concatenation of All Words Leetcode Solution4011
3884Sum4011
389Check if a given array contains duplicate elements within k distance from each other4000
390Max stack3986
391LRU Cache Implementation3985
392Find the First and Second Smallest Elements3985
393Implementation of Deque using circular array3983
394Word Search3976
395Graph Valid Tree LeetCode Solution3971
396Longest subarray not having more than K distinct elements3966
397Minimize Maximum Pair Sum in Array LeetCode Solution3963
398Sort a stack using a temporary stack3963
399Invert Binary Tree LeetCode Solution3956
400Regular Expression Matching Regular Expression Matching LeetCode Solution3954
401Stack Permutations (Check if an array is stack permutation of other)3954
402Sliding Window Technique3954
403Stone Game II Leetcode3939
404Permutation Sequence LeetCode Solution3935
405Non-decreasing Array LeetCode Solution3934
406Longest subsequence such that difference between adjacents is one3933
407Best Time to Buy and Sell Stock with Cooldown Leetcode Solution3928
408Find the subarray with least average3927
409Convert Sorted Array to Binary Search Tree LeetCode Solutions3924
410Find the Smallest Divisor given a Threshold Leetcode Solution3922
411Kth Smallest Element in a BST Leetcode Solution3921
412Design Browser History LeetCode Solution3919
413Find duplicates in a given array when elements are not limited to a range3910
414Priority Queue using doubly linked list3906
415Number Complement Leetcode Solution3901
416Top View of Binary Tree3900
417Queries for counts of array elements with values in given range3898
418Number of Islands II LeetCode Solution3897
419Missing Element in Sorted Array LeetCode Solution3896
420Minesweeper LeetCode Solution3883
421LRU Cache Leetcode Solution3877
422K Closest Points to Origin Leetcode Solution3876
423Painting Fence Algorithm3876
424Common elements in all rows of a given matrix3876
425Partition List Leetcode Solution3869
426Maximum Number of Occurrences of a Substring Leetcode Solution3865
427Path With Maximum Minimum Value LeetCode Solution3856
428First Circular Tour to Visit all the Petrol Bunks3854
429Nth Catalan Number3853
430Find the Peak Element from an Array3850
431Snakes and Ladders LeetCode Solution3849
432Find Top K (or Most Frequent) Numbers in a Stream3847
433Fibonacci Number LeetCode Solution3840
434Number of Smaller Elements on Right Side3840
435Can Make Arithmetic Progression From Sequence Leetcode Solution3834
436Sequences of given length where every element is more than or equal to twice of previous3833
437Sliding Window Maximum LeetCode Solution3820
438Combination Sum IV LeetCode Solution3817
439Find Maximum Level sum in Binary Tree3817
440Sort elements by frequency3814
441Maximum Consecutive Numbers Present in an Array3810
442High Five LeetCode Solution3807
443Search a 2D Matrix II Leetcode Solution3805
444Integer Break LeetCode Solution3804
445Odd Even Linked List Leetcode Solution3803
446Tiling Problem3799
447Flood Fill LeetCode3792
448Insert Interval Leetcode Solution3788
449Check if Two given Strings are Isomorphic to each other3786
450Gold Mine Problem3781
451Count items common to both the lists but with different prices3779
452Move All the Zeros to the End of the Given Array3778
453Rearrange array such that even positioned are greater than odd3776
454Find Minimum in Rotated Sorted Array II LeetCode Solution3766
455Longest Palindrome can be Formed by Removing or Rearranging Characters3763
456Distance of nearest cell having 1 in a binary matrix3756
457Interval Tree3756
458Shortest Palindrome3752
459N queen problem3751
460Consecutive Characters LeetCode Solution3738
461Insert into a Binary Search Tree Leetcode Solution3731
462Search in a Binary Search Tree Leetcode Solution3726
463Kth Non-repeating Character3723
464Design a stack that supports getMin() in O(1) time and O(1) extra space3715
465Number of Closed Islands Leetcode Solution3712
466Trapping Rain Water LeetCode Solution3704
467Minimum Absolute Difference in BST Leetcode Solution3702
468Spiral Matrix III LeetCode Solution3701
469Replace Elements with Greatest Element on Right Side Leetcode Solution3700
470Find a Peak Element II LeetCode Solution3695
471Fibonacci numbers3695
472Expression Contains Redundant Bracket or Not3691
473Decompress Run-Length Encoded List Leetcode Solution3685
474Sort Colors3685
475Reverse a linked list3685
476Longest Common Prefix using Sorting3682
477Integer to English words3679
478Sliding Window Median Leetcode Solution3678
479Evaluate Reverse Polish Notation LeetCode Solution3671
480Check If Array Pairs Are Divisible by k LeetCode Solution3671
481Find All Possible Recipes from Given Supplies LeetCode Solution3670
482Find Pythagorean Triplets from Array3663
483Convert Sorted Array to Binary Search Tree Leetcode Solution3659
484Restore IP Addresses Leetcode Solution3658
485Queries for GCD of all numbers of an array except elements in a given range3658
486Coin Change Problem3655
487Minimum Path Sum3653
488Binary Tree Maximum Path Sum LeetCode Solution3648
489Vertical Order Traversal of Binary Tree LeetCode Solution3644
490Sorting array using Stacks3644
491Palindrome Substring Queries3638
492Balanced Expression with Replacement3630
493Sort an array according to the order defined by another array3627
494Majority Element3609
495Rearrange an array in order – smallest, largest, 2nd smallest, 2nd largest3608
496Priority Queue in C++3607
497Best Time to Buy and Sell Stock3605
498Morris Traversal3602
499Multiplication of Two Matrices3598
500Camelcase Matching Leetcode Solution3594
501Subset sum problem3591
502Cells with Odd Values in a Matrix LeetCode Solution3582
503Find Median from Data Stream LeetCode Solution3576
504Number of Days Between Two Dates LeetCode Solution3575
505Find the first Repeating Number in a Given Array3570
506Queue using Stacks3568
507Minimum Number of Taps to Open to Water a Garden LeetCode Solution3559
508Path Crossing Leetcode Solution3552
509How to Implement Stack Using Priority Queue or Heap?3551
510Is Graph Bipartite? LeetCode Solution3550
511The Stock Span Problem3550
512Generate all Binary Strings from Given Pattern3545
513Design Hit Counter LeetCode Solution3542
514Path Sum II LeetCode Solution3539
515Sieve of Eratosthenes3536
516Detect a loop in the Linked List3528
517Analyze User Website Visit Pattern LeetCode Solution3522
518Count subarrays having total distinct elements same as original array3520
519Shortest Completing Word Leetcode Solution3518
520Kth ancestor of a node in binary tree3517
521Divide Chocolate LeetCode Solution3515
522Longest Increasing Path in a Matrix LeetCode Solution3515
523Pancake Sorting Problem3515
524Intersection of Two Linked Lists LeetCode Solution3510
525Largest rectangular sub-matrix whose sum is 03509
526Count Submatrices With All Ones LeetCode Solution3508
527Find a Fixed Point in a Given Array3499
528Custom Sort String Leetcode Solution3497
529Monotonic Array Leetcode Solution3494
530Check if Array Contains Contiguous Integers With Duplicates Allowed3486
531Letter Case Permutation3484
532Group Anagrams3481
533Construction of Longest Increasing Subsequence (N log N)3471
534Best Time to Buy and Sell Stock with Transaction Fee Leetcode Solution3470
535Minimum Height Trees3470
536Implement strStr() LeetCode Solution3467
537Different Ways to Add Parentheses Leetcode Solution3465
538Decode Ways3465
539Determine Whether Matrix Can Be Obtained By Rotation LeetCode Solution3458
540Maximum Element in an Array which is Increasing and then Decreasing3458
541Valid Boomerang Leetcode Solution3447
542Queue based approach for first non-repeating character in a stream3445
543Merge Overlapping Intervals3443
544Scramble String LeetCode Solution3442
545Nearest Exit from Entrance in Maze LeetCode Solution3436
546How to Create Mergable Stack?3434
547Find maximum length Snake sequence3430
548Shifting Letters LeetCode Solution3429
549Perfect Squares LeetCode Solution3428
550Number of Distinct Islands Leetcode Solution3426
551Find the Lost Element From a Duplicated Array3420
552Decode String3417
553Best Time to Buy and Sell Stock IV LeetCode Solution3409
554First missing positive3408
555Implement Trie (Prefix Tree) Leetcode Solution3406
556Reorder Data in Log Files LeetCode Solution3405
557Longest Common Prefix using Divide and Conquer3402
558LCS (Longest Common Subsequence) of three strings3397
559Maximum Sum of Non Consecutive Elements3396
560Sliding Window Maximum3394
561Sort a stack using recursion3392
562Race Car LeetCode Solution3389
563Count Possible Triangles3387
564Binary Tree zigzag level order Traversal3386
565Most Stones Removed with Same Row or Column LeetCode Solution3383
566Design Skiplist LeetCode Solution3382
567Build an Array With Stack Operations Leetcode Solution3378
568Recover Binary Search Tree3378
569Guess Number Higher or Lower II3375
570Find if an Expression has Duplicate Parenthesis or Not3375
571Number of Equivalent Domino Pairs Leetcode Solution3374
572Champagne Tower LeetCode Solution3373
573Insert Node in the Sorted Linked List3372
574Largest Subarray with Equal Number of 0’s and 1’s3361
575Contiguous Array LeetCode Solution3360
576Minimum Bracket Reversals3352
577All Possible Full Binary Trees LeetCode Solution3348
578Rectangle Overlap LeetCode Solution3347
579Smallest Good Base3343
580Maximum Length of Chain Pairs3341
581Make Two Arrays Equal by Reversing Sub-arrays Leetcode Solution3331
582Palindrome Permutation LeetCode Solution3330
583Find the two Numbers with Odd Occurrences in an Unsorted Array3328
584Find a Sorted Subsequence of size 33320
585Longest Substring with At Least K Repeating Characters LeetCode Solution3313
586Longest Repeated Subsequence3313
587Maximum Number of Ways to Partition an Array LeetCode Solution3309
588Merge Two Binary Trees LeetCode Solution3304
589Group Multiple Occurrence of Array Elements Ordered by first Occurrence3303
590Recover Binary Search Tree Leetcode Solution3302
591Minimum Height Trees LeetCode Solution3301
592Find the Town Judge LeetCode Solution3297
593Maximum Depth of N-ary Tree Leetcode Solution3297
594Distance Between Bus Stops Leetcode Solution3296
595Rearrange Spaces Between Words Leetcode Solution3294
596Palindrome Partitioning Leetcode Solution3291
597Design a Stack With Increment Operation Leetcode Solution3291
598Implement Two Stacks in an Array3287
599Print all Palindromic Partitions of a String3286
600Reorder an Array According to the Given Indexes3283
601Valid Parentheses Leetcode Solution3271
602Subarrays with K Different Integers Leetcode Solution3270
603K-th Distinct Element in an Array3269
604Heap Sort3263
605Check for Balanced Parentheses in an Expression3258
606Lowest Common Ancestor of a Binary Search Tree Leetcode Solution3254
607Minimum number of jumps to reach end3254
608The Maze III LeetCode Solution3240
609Huffman Coding3239
610Jump Game IV LeetCode Solution3238
611Maximum sum rectangle in a 2D matrix3236
612Sort a String According to Another String3233
613Find the First Circular Tour that visits all the Petrol Pumps3230
614Mean of Array After Removing Some Elements Leetcode Solution3227
615Count pair with Given Sum3221
616Maximize Elements Using Another Array3221
617Maximum Score After Splitting a String Leetcode Solution3215
618Contains Duplicate3212
619Perform String Shifts Leetcode3211
620Word Break3204
621Merge Overlapping Intervals II3201
622Valid Sudoku3194
623Find First and Last Position of Element in Sorted Array LeetCode Solution3188
624Find the Minimum Element in a Sorted and Rotated Array3182
625Palindrome Permutation3179
626Find Largest Value in Each Tree Row LeetCode Solution3177
627Minimum Jumps to Reach Home LeetCode Solution3174
628Convert BST to Min Heap3174
629Caesar Cipher3170
630Palindrome Permutations of a String3168
631Possible Bipartition LeetCode Solution3166
632Iterative Method to find Height of Binary Tree3165
633A Space Optimized DP solution for 0-1 Knapsack Problem3165
634Edit Distance LeetCode Solution3159
635All Unique Triplets that Sum up to a Given Value3149
636Palindromic Substrings Leetcode Solution3144
637Count Sub Islands LeetCode Solution3141
638Reach a Number LeetCode Solution3129
639Segregate 0s and 1s in an Array3129
640Best Meeting Point LeetCode Solution3120
641Find Median from data Stream3116
642Number of palindromic paths in a matrix3113
643My Calendar I LeetCode Solution3112
644Find the Subarray of given length with Least Average3106
645Find all triplets with zero sum3105
646Maximum Product of Splitted Binary Tree LeetCode Solution3101
647Merge Two Balanced Binary Search Trees3100
648Level order Traversal in Spiral Form3099
649Check if the given array can represent Level Order Traversal of Binary Search Tree3094
650Pair with given product3093
651Word Pattern3091
652Count Good Nodes in Binary Tree LeetCode Solution3070
653Brick Wall LeetCode Solution3070
654Partition Problem3070
655Sorted Linked List to Balanced BST3065
656Rearrange Array such that arr[i] >= arr[j] if i is even and arr[i] <= arr[j] if i is odd and j < i3064
657Breadth First Search (BFS) for a Graph3059
658Validate Binary Search Tree3058
659Alien Dictionary3055
660Convert Sorted List to Binary Search Tree3047
661Swapping Nodes in a Linked List Leetcode Solution3042
662Construct BST from given Preorder Traversal3042
663Isomorphic Strings LeetCode Solution3038
664Find whether a subarray is in form of a mountain or not3037
665Add two numbers3035
666Number of Subsequences That Satisfy the Given Sum Condition LeetCode solution3031
667Minimum time required to rot all oranges3028
668How to Efficiently Implement k Stacks in a Single Array?3028
669Merge K Sorted Arrays and Print Sorted Output3024
670Sort 0s 1s and 2s in an Array3024
671Maximize Sum of Array after K Negations Leetcode Solution3020
672Rotate Array3016
673Queries on Probability of Even or Odd Number in given Ranges3012
674Shortest Path in a Grid with Obstacles Elimination LeetCode Solution3011
675Print Fibonacci sequence using 2 variables3009
676Largest Sum Contiguous Subarray3008
677Populating Next Right Pointers in Each Node3008
678Find all pairs (a, b) in an array such that a % b = k3006
679Bubble sort using two Stacks3000
680Longest Subarray Having Count of 1s One More than Count of 0s2999
681Count Distinct Elements in Every Window of Size K2998
682Find Zeros to be Flipped so that Number of Consecutive 1’s is Maximized2998
683Remove brackets from an algebraic string containing + and – operators2995
684Range Sum Query 2D – Immutable LeetCode Solution2980
685Filter Restaurants by Vegan-Friendly, Price and Distance Leetcode Solution2977
686Maximum Number of Chocolates to be Distributed Equally Among k Students2974
687Maximum Frequency Stack Leetcode Solution2971
688Find four elements that sum to a given value (Hashmap)2963
689Detect Capital Leetcode Solution2962
690Split Array Into Consecutive Subsequences2958
691Count ways to reach the nth stair using step 1, 2 or 32954
692Minimum Swaps to Group All 1’s Together Leetcode Solution2953
693Merge Two Sorted Lists Leetcode2948
694Binary Tree Right Side View LeetCode Solution2942
695Difference Array | Range update query in O(1)2941
696Partition Equal Subset Sum2941
697Remove duplicates from sorted array2939
698Binary Tree to Binary Search Tree Conversion2937
699Counting Bits2937
700Remove Palindromic Subsequences Leetcode Solution2927
701Print all subarrays with 0 sum2927
702Check if a Linked list of Strings form a Palindrome2927
703Partition to K Equal Sum Subsets Leetcode Solution2925
704Length of Longest Fibonacci Subsequence2925
705Topological Sorting2920
706Minimum Sum Path in a Triangle2913
707Happy Number2912
708Elements Appear more than N/K times in Array2908
709Find pairs with given sum such that elements of pair are in different rows2906
710Populating Next Right Pointers in Each Node Leetcode Solution2903
711Concatenation of Array LeetCode Solution2899
712Contiguous Array Leetcode2899
713Arithmetic Slices II – Subsequence LeetCode Solution2892
714Find All Pairs With a Given Difference2888
715Reverse Nodes in K-Group2885
716String comparison containing wildcards2882
717Queue Reconstruction by Height2879
718Web Crawler LeetCode Solution2875
719Inorder Successor of a node in Binary Tree2873
720Minimum Swaps to Make Strings Equal Leetcode Solution2863
721Minimum Number of Arrows to Burst Balloons LeetCode Solution2862
722MiniMax Algorithm2844
723Maximum Distance in Array2840
724Increasing Subsequence of Length three with Maximum Product2837
725Score of Parenthesis LeetCode Solution2835
726Swap Kth Node from beginning with Kth Node from End2828
727Find Duplicate Subtrees2823
728Root to Leaf path with target sum Leetcode Solutions2820
729An Interesting Method to generate Binary Numbers from 1 to n2816
730Finding K closest element2816
731Longest Common Prefix Using Binary Search II2812
732Given a binary tree, how do you remove all the half nodes?2811
733Check if String Follows Order of Characters by a Pattern or not2810
734Longest Increasing Subsequence2804
735Climbing stairs2792
736Union and Intersection of two Linked Lists2789
737Pancake Sorting2789
738Iterative Preorder Traversal2788
739Delete Nth node from the end of the given linked list2786
740Maximum Product Subarray II2786
741Symmetric Tree2785
742Find K Closest Elements LeetCode Solution2784
743Find the first repeating element in an array of integers2784
744BFS vs DFS for Binary Tree2778
745Construct Binary Tree from given Parent Array representation2777
746Container with Most Water2774
747Parallel Courses II LeetCode Solution2773
748Count Minimum Steps to Get the given Array2771
749Deletion in a Binary Tree2766
750Construct Binary Tree from Preorder and Postorder Traversal LeetCode Solution2750
751Delete Nodes and Return Forest Leetcode Solution2747
752Find the Difference Leetcode Solution2737
753Check if all levels of two Binary Tree are anagrams or not2736
754Nested List Weight Sum II LeetCode Solution2734
755Kill Process LeetCode Solution2733
756Level order traversal using two Queues2731
757Sum Root to Leaf Numbers LeetCode Solution2730
758Minimum Cost to Move Chips to The Same Position LeetCode Solution2730
759Substring With Concatenation Of All Words2730
760Level of Each node in a Tree from source node2728
761Boundary Traversal of binary tree2727
762Rearrange an Array Such that arr[i] is equal to i2726
763Find Maximum of Minimum for Every Window Size in a Given Array2718
764Count pairs from two linked lists whose sum is equal to a given value2717
765Linked List Cycle2715
766Sort Array by Increasing Frequency Leetcode Solution2709
767Iterative Depth First Traversal of Graph2709
768Super Ugly Number2708
769Minimum Remove to Make Valid Parentheses LeetCode Solution2707
770Non-overlapping sum of two sets2704
771Minimum Size Subarray Sum2704
772Tree Traversal (Preorder, Inorder & Postorder)2702
773Matrix Chain Multiplication2696
774New 21 Game2694
775Longest Common Prefix Word by Word Matching2689
776Valid Anagrams2688
777Reorder Array Using Given Indexes2688
778Remove Duplicates from Sorted List II2684
779Sum of f(a[i], a[j]) over all pairs in an array of n integers2680
780K maximum sums of overlapping contiguous sub-arrays2677
781Maximum size subarray sum equals k2673
782Merging Intervals2672
783Reservoir Sampling2669
784Range LCM Queries2668
785Merge K Sorted Linked Lists2667
786Palindrome Partitioning2662
787Check if any two intervals overlap among a given set of intervals2661
788Print a Binary Tree in Vertical Order2655
789Sorting a K Sorted Array2647
790Hamming Distance2643
791Flatten Binary Tree to Linked List LeetCode Solution2640
792Balanced Binary Tree2638
793Maximum Product Subarray2637
794The Painter’s Partition Problem2636
795Create Maximum Number2628
796Missing Number2627
797Peak Index in a Mountain Array LeetCode Solution2626
798Friends Of Appropriate Ages LeetCode Solution2622
799Maximum difference between two elements such as larger element comes after smaller2618
800Check if a queue can be sorted into another queue using a stack2615
801Verify Preorder Serialization of a Binary Tree2615
802Check if Two Expressions With Brackets are Same2613
803Lowest Common Ancestor2613
804Find Maximum Sum Possible Equal Sum of Three Stacks2611
805Valid Triangle Number LeetCode Solution2610
806Defanging an IP Address LeetCode Solution2610
807Iterative Postorder Traversal Using Two Stacks2607
808Find Three Element From Different Three Arrays Such That a + b + c = sum2599
809Valid Triangle Number LeetCode Solution2593
810Unique Binary Search Trees LeetCode Solution2590
811Smallest Range II Leetcode Solution2590
812Find Sum of all unique sub-array sum for a given array2589
813Find Element Using Binary Search in Sorted Array2587
814Minimum insertions to form a palindrome with permutations allowed2586
815Check if a given array can represent Preorder Traversal of Binary Search Tree2585
816Vertical sum in a given binary tree2584
817Sort Elements by Frequency II2582
818Count number of triplets with product equal to given number2581
819Find subarray with given sum (Handles Negative Numbers)2574
820Largest Submatrix With Rearrangements LeetCode Solution2567
821Newman-Conway Sequence2567
822Maximum difference between frequency of two elements such that element having greater frequency is also greater2565
823Check if two nodes are on the same path in a Tree2565
824Find K Length Subarray of Maximum Average2565
825Minimum Distance Between BST Nodes Leetcode Solution2564
826Find distance between two nodes of a Binary Tree2563
827Number Of Longest Increasing Subsequence2559
828Merging Two Sorted Arrays2558
829Find Common Characters Leetcode Solution2548
830First Bad Version2543
831Check Completeness of a Binary Tree LeetCode Solution2541
832Third Maximum Number Leetcode Solution2540
833Maximum subsequence sum such that no three are consecutive2534
834Flatten 2D Vector LeetCode Solution2533
835Segment Tree2533
836Print all triplets in sorted array that form AP2531
837Find Peak Element2527
838Longest Bitonic Subsequence2525
839Arrange given numbers to form the biggest number2523
840Lower Case To Upper Case2523
841Maximum number of segments of lengths a, b and c2522
842Kth Smallest Element in a Sorted Matrix LeetCode Solution2521
843Print All Distinct Elements of a Given Integer Array2521
844Closest Leaf in a Binary Tree LeetCode Solution2520
845Products of ranges in an array2520
846Employee Importance LeetCode Solution2518
847Largest subarray with equal number of 0s and 1s2517
848Range Sum Query using Sparse Table2514
849Array Nesting Leetcode Solution2511
850Find Smallest Range Containing Elements from k Lists2510
851Diagonal Traversal of Binary Tree2510
852Valid Parenthesis String2503
853Stone Game IV LeetCode Solution2501
854Find Nth Node2501
855Median of Two Sorted Arrays2498
856Trapping Rain Water II LeetCode Solution2490
857Distinct Subsequences2490
858Contiguous Array2488
859Longest Palindromic Subsequence2488
860Print Right View of a Binary Tree2484
861Largest BST Subtree LeetCode Solution2478
862Bottom View of a Binary Tree2476
863Maximum Population Year LeetCode Solution2472
864Write a function to get the intersection point of two Linked Lists2469
865Shuffle an Array2467
866Compare Strings by Frequency of the Smallest Character Leetcode Solution2466
867Largest divisible pairs subset2466
868Path Sum2462
869Four Elements that Sum to Given2461
870Number of siblings of a given Node in n-ary Tree2456
871Stone Game IV LeetCode Solution2450
872Isomorphic Strings2448
873Count and Say2446
874Binary array after M range toggle operations2445
875Subset Sum Problem in O(sum) space2443
876Find the largest multiple of 32442
877Infix to Postfix2441
878Unique Binary Search Trees2440
879Merge Two Sorted Arrays2439
880Permutations of a Given String Using STL2427
881Red-Black Tree Introduction2426
882Next Greater Element in an Array2420
883Height of a generic tree from parent array2413
884Minimum Swaps To Make Sequences Increasing LeetCode Solution2408
885Friends Pairing Problem2407
886Find Largest d in Array such that a + b + c = d2403
887Valid Perfect Square LeetCode Solution2396
888Closest Binary Search Tree Value Leetcode Solution2395
889The Number of Weak Characters in the Game LeetCode Solution2394
890Maximum Product Subarray2394
891Valid Number2392
892Maximum Side Length of a Square with Sum Less than or Equal to Threshold LeetCode Solution2384
893Encoded String With Shortest Length LeetCode Solution2384
894Sentence Screen Fitting LeetCode Solution2382
895Count Primes in Ranges2382
896Averages of Levels in Binary Tree2375
897Rearrange an array such that ‘arr[j]’ becomes ‘i’ if ‘arr[i]’ is ‘j’2374
898Insert Delete GetRandom2371
899Transform a BST to Greater sum Tree2363
900Find unique character in a string2362
901Maximum Sum of 3 Non-Overlapping Subarrays2360
902Shuffle a given Array2360
903Binary Search Tree Delete Operation2355
904Edit Distance2353
905Range Minimum Query (Square Root Decomposition and Sparse Table)2352
906Print n terms of Newman-Conway Sequence2348
907Step-By-Step Directions From a Binary Tree Node to Another LeetCode Solution2335
908Integer to Roman2334
909Binary Tree Longest Consecutive Sequence LeetCode Solution2330
910Convert BST into a Min-Heap without using array2326
911Orderly Queue LeetCode Solution2325
912Reorganize String2325
913Minimum sum of squares of character counts in a given string after removing k characters2323
914Serialize and Deserialize Binary Tree LeetCode Solution2321
915Serialize and Deserialize Binary Tree2315
916Maximum Product Subarray2308
917Find Minimum In Rotated Sorted Array2308
918Lowest Common Ancestor in Binary Search Tree2305
919Kth Smallest Number in Multiplication Table Leetcode Solution2303
920Range Queries for Longest Correct Bracket Subsequence2302
921Bold Words in String LeetCode Solution2298
922Next greater element2297
923Swap Nodes In Pairs2295
924Koko Eating Bananas LeetCode Solution2291
925Array Queries for multiply replacements and product2287
926Diameter of N-Ary Tree LeetCode Solution2285
927Find the smallest binary digit multiple of given number2280
928K’th Largest element in BST using constant extra space2274
929Maximum Sum Increasing Subsequence2272
930K’th Largest Element in BST when modification to BST is not allowed2267
931Advantages of BST over Hash Table2258
932Constant time range add operation on an array2255
933Moving Stones Until Consecutive Leetcode Solution2254
934Write Code to Determine if Two Trees are Identical2251
935Insert into a Sorted Circular Linked List LeetCode Solution2245
936Next Greater Element II LeetCode Solution2241
937Best Meeting Point LeetCode Solution2235
938Valid Tic-Tac-Toe State LeetCode Solution2233
939Design Underground System Leetcode Solution2229
940Check if an Array is Stack Sortable2228
941Power of Two2219
942Queries on XOR of greatest odd divisor of the range2218
943Longest Increasing Consecutive Subsequence2217
944Total Hamming Distance LeetCode Solution2216
945Level Order Traversal of Binary Tree2207
946Number of Orders in the Backlog Leetcode Solution2206
947Numbers with prime frequencies greater than or equal to k2205
948Reverse a Path in BST using Queue2201
949Check if each internal node of a BST has exactly one child2198
950Find the node with minimum value in a Binary Search Tree2198
951Number of elements less than or equal to a given number in a given subarray2197
952Clone a Binary Tree with Random Pointers2196
953Check if X can give change to every person in the Queue2195
954Count the Pairs at Same Distance as in English Alphabets2195
955Form minimum number from given sequence2190
956Greatest Sum Divisible by Three LeetCode Solution2189
957Image Overlap LeetCode Solution2187
958Maximum Array from Two given Arrays Keeping Order Same2184
959A program to check if a binary tree is BST or not2183
960Find minimum number of merge operations to make an array palindrome2181
961Count and Toggle Queries on a Binary Array2175
962Graph Cloning2174
963Design Add and Search Words Data Structure LeetCode Solution2173
964Collect maximum points in a grid using two traversals2171
965Factorial Trailing Zeroes LeetCode Solution2164
966Closest Binary Search Tree Value II LeetCode Solution2160
967Merge Sort2155
968Print Next Greater Number of Q queries2154
969Merge two BSTs with limited extra space2145
970Largest Plus Sign Leetcode Solution2144
971Queries for Decimal Values of Subarrays of a Binary Array2143
972Form Minimum Number From Given Sequence2143
973Check for Palindrome after every character replacement Query2142
974Maximum difference between first and last indexes of an element in array2141
975Merge Sorted Array2133
976Group Shifted Strings Leetcode Solution2131
977Dividing Array into Pairs With Sum Divisible by K2126
978Priority Queue2117
979Print Ancestors of a Given Binary Tree Node Without Recursion2103
980Longest Substring Without Repeating Characters Leetcode Solution2100
981Print modified array after multiple array range increment operations2100
982Print all Possible Ways to Break a String in Bracket Form2093
983Count even length binary sequences with same sum of first and second half bits2091
984Excel Sheet Column Number LeetCode Solution2090
985Palindrome Partitioning2087
986Guess The Word2087
987Binary Search Tree2083
988Cutting a Rod2081
989Swim in Rising Water LeetCode Solution2075
990Kth Smallest Element in a BST2072
991Minimum Moves to Equal Array Elements LeetCode Solution2070
992Find postorder traversal of BST from preorder traversal2062
993Excel Sheet Column Title LeetCode Solution2053
994Find maximum average subarray of k length2045
995Count Pairs Whose Products Exist in Array2041
996How to print maximum number of A’s using given four keys2037
997Insert Delete GetRandom O(1) – Duplicates allowed LeetCode Solution2036
998Unique Paths II2034
999Binary Search Tree Search and Insertion2019
1000Regular Expression Matching2018
1001Sum of Left Leaves LeetCode Solution2016
1002Check given array of size n can represent BST of n levels or not2013
1003Longest Common Prefix using Character by Character Matching2012
1004K Empty Slots2007
1005Decrease Elements To Make Array Zigzag LeetCode Solution1978
1006Sorted Array to Balanced BST1976
1007Minimum Possible Integer After at Most K Adjacent Swaps On Digits LeetCode Solution1967
1008Queries for Number of Distinct Elements in a Subarray1960
1009Maximum Depth Of Binary Tree1945
1010Construct Complete Binary Tree from its Linked List Representation1939
1011Iterative method to find ancestors of a given binary tree1938
1012Find the Town Judge LeetCode Solution1934
1013Shortest Unsorted Continuous Subarray LeetCode Solution1920
1014Maximum weight transformation of a given string1911
1015Find Maximum Depth of Nested Parenthesis in a String1896
1016Binary Tree to Binary Search Tree Conversion using STL set1895
1017Symmetric Tree LeetCode Solution Leetcode Solution1888
1018Data Structure Designing1871
1019Random Pick Index LeetCode Solution1867
1020Search in Sorted Rotated Array1867
1021Search an Element in Sorted Rotated Array1823
1022Next Greater Element I Leetcode Solution1812
1023Convert a BST to a Binary Tree such that sum of all greater keys is added to every key1809
1024Kth Smallest Product of Two Sorted Arrays LeetCode Solution1807
1025Minimum Number of Operations to Move All Balls to Each Box LeetCode Solution1801
1026Print Maximum Length Chain of Pairs1773
1027Flatten Binary Tree to Linked List LeetCode Solution1768
1028Maximum Binary Tree1749
1029Peeking Iterator LeetCode Solution1720
1030Find k-th smallest element in BST (Order Statistics in BST)1703
1031Find Two Non-overlapping Sub-arrays Each With Target Sum LeetCode Solution1668
Translate »