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 Solution38040
2Maximum occurring character in a string18439
3Plus One Leetcode Solution17435
4Valid Parentheses LeetCode Solution17076
53Sum Leetcode Solution14856
6First Repeating Element13839
7Single Number Leetcode Solution13155
8Count Primes Leetcode Solutions12886
9Merge Sorted Arrays Leetcode Solution12493
10Pow(x, n) Leetcode Solution12484
11Sqrt(x) Leetcode Solution12283
12Meeting Rooms II LeetCode Solution11706
13Concatenation of Array LeetCode Solution11373
14Roman to Integer Leetcode Solution10639
15Contains Duplicate II Leetcode Solution10561
16Palindrome Number LeetCode Solution10369
17Search Insert Position Leetcode Solution10320
18Valid Palindrome Leetcode Solution10202
19Reverse Vowels of a String Leetcode Solution9846
20Jump Game Leetcode Solution9805
21Intersection of Two Arrays II Leetcode Solution9588
22Number of Good Pairs Leetcode Solution9544
23Kids With the Greatest Number of Candies Leetcode Solution9439
24Spiral Matrix LeetCode Solution9416
25House Robber Leetcode Solution9358
26Longest Substring Without Repeating Characters LeetCode Solution9290
27Add Binary Leetcode Solution9215
28Find the Maximum Repeating Number in Array9046
29Text Justification LeetCode Solution8900
30Maximum Subarray Leetcode Solution8682
31Number Of 1 bits8662
32Longest Palindromic Substring LeetCode Solution8650
33Remove Duplicates from Sorted Array Leetcode Solution8552
34Jewels and Stones Leetcode Solution8511
35Power of Two Leetcode Solution8431
36Permutations Leetcode Solution8361
37Min Stack Leetcode Solution8225
38Shuffle String Leetcode Solution8223
39Find All Numbers Disappeared in an Array Leetcode Solution8176
40Move Zeroes LeetCode Solution8098
41Daily Temperatures Leetcode Solution8037
42Next Permutation Leetcode Solution8005
43Word Search Leetcode Solution8000
44Number of Islands LeetCode Solution7979
45Kth Missing Positive Number Leetcode Solution7929
46Maximum Profit in Job Scheduling Leetcode Solution7903
47Median of Two Sorted Arrays LeetCode Solution7891
48Longest Common Prefix Leetcode Solution7858
49Frog Jump Leetcode Solution7819
50Third Maximum Number Leetcode Solution7757
51Running Sum of 1d Array Leetcode Solution7677
52Find Minimum Distance Between Two Numbers in an Array7635
53Next Greater Element I Leetcode Solution7613
54Search in Rotated Sorted Array Leetcode Solution7541
55Can Place Flowers LeetCode Solution7507
56Rotate Image LeetCode Solution7487
57Shuffle the Array Leetcode Solution7415
58Multiply Strings Leetcode Solution7404
59Combination Sum Leetcode Solution7393
60Bulb Switcher LeetCode Solution7349
613Sum Closest LeetCode Solution7330
62Valid Anagram Leetcode Solution7254
63House Robber II Leetcode Solution7241
64Count and Say Leetcode Solution7220
65Missing Number Leetcode Solution7060
66Subarray and Subsequence7057
67Evaluation of Postfix Expression7028
68Reverse String Without Temporary Variable7009
69Isomorphic Strings Leetcode Solution6997
70Strobogrammatic Number LeetCode Solution6994
71Excel Sheet Column Title Leetcode Solution6959
72Koko Eating Bananas Leetcode Solution6952
73Integer to Roman Leetcode Solution6933
74Product of array except self6914
75Count Pairs With Given Sum6845
76Rotate String LeetCode Solution6839
77Majority Element Leetcode Solution6708
78Happy Number Leetcode Solution6668
79Find the Difference Leetcode Solution6658
80String to Integer (atoi) LeetCode Solution6642
81Candy LeetCode Solution6625
82Subtract the Product and Sum of Digits of an Integer Leetcode Solution6609
83Find Common Characters Leetcode Solution6554
84Largest Number Leetcode Solution6543
85Is Subsequence Leetcode Solution6496
86How Many Numbers Are Smaller Than the Current Number Leetcode Solution6434
87Set Matrix Zeroes6410
88Balanced Binary Tree Leetcode Solution6336
89Best Time to Buy and Sell Stock LeetCode Solution6306
90Subset Leetcode6303
91Summary Ranges Leetcode Solution6302
92Word Pattern LeetCode Solution6281
93Find the Town Judge Leetcode Solution6259
94Unique Paths Leetcode Solution6205
95Arranging Coins Leetcode Solution6148
96Find the Duplicate Number LeetCode Solution6146
97Smallest window in a string containing all characters of another string6144
98Binary Search LeetCode Solution6127
99Sort Characters By Frequency LeetCode Solution6115
100Rearrange Positive and Negative Numbers Alternatively in Array6112
101Sort Colors LeetCode Solution6095
102Find the Winner of the Circular Game LeetCode Solution6034
103String Compression LeetCode Solution6030
104A Product Array Puzzle6028
105Asteroid Collision LeetCode Solution6002
106Repeated Substring Pattern LeetCode Solution5978
107Expression Evaluation5954
108Rabin Karp Algorithm5949
109Zigzag Conversion LeetCode Solution5823
110Best Time to Buy and Sell Stock  II Leetcode Solution5813
111Valid Palindrome II Leetcode Solution5803
112Sort Array By Parity LeetCode Solution5788
113Sum of minimum and maximum elements of all subarrays of size k5757
114Group Anagrams LeetCode Solution5756
115Divide Two Integers Leetcode Solution5723
116Product of Array Except Self LeetCode Solution5707
117Reverse Integer Leetcode Solution5701
118Linked List Cycle II LeetCode Solution5655
119Page Replacement Algorithms in Operating Systems5592
120Bus Routes Leetcode Solution5578
121Merge Two Sorted Lists Leetcode Solutions5545
122Pascal Triangle Leetcode5522
123Matrix Chain Multiplication using Dynamic Programming5520
124Postfix to Infix Conversion5511
125Kth largest element in an Array Leetcode Solutions5507
126Employee Free Time LeetCode Solution5494
127Length of Last Word Leetcode Solution5478
128Assign Cookies Leetcode Solution5465
129Generate Parentheses Leetcode Solution5445
130Number of Provinces Leetcode Solution5438
131Minimum Cost For Tickets Leetcode Solution5428
132First element occurring k times in an array5395
133Remove Duplicates from Sorted Array II Leetcode Solution5392
134Minimum Steps to reach target by a Knight5380
135H-Index Leetcode Solution5377
136Decode String Leetcode Solution5376
137Optimal Account Balancing LeetCode Solution5372
138Build Array From Permutation Leetcode Solution5367
139Increasing Triplet Subsequence LeetCode Solution5318
140Convert array into Zig-Zag fashion5304
141Defanging an IP Address Leetcode Solution5274
142Implementation of Deque using Doubly Linked List5256
143Fibonacci Number LeetCode Solution5200
144Pascal’s Triangle II Leetcode Solution5161
145Robot Room Cleaner Leetcode Solution5140
146Swap Nodes in Pairs Leetcode Solutions5108
147Island Perimeter Leetcode Solution5103
148KMP Algorithm5101
149Bellman Ford Algorithm5090
150First Unique Character in a String LeetCode Solution5041
151Prefix to Infix Conversion5022
152K-th Smallest Element in a Sorted Matrix5014
153Check if the Elements of an Array are Consecutive5010
154Max Consecutive Ones Leetcode Solution5008
155Subarray with Given Sum4973
156Length of the largest subarray with contiguous elements4970
157OSI Model4970
158Guess Number Higher or Lower LeetCode Solution4967
159Find First and Last Position of Element in Sorted Array Leetcode Solution4963
160Find Smallest Missing Number in a Sorted Array4940
161Find the Missing Number4938
162Find Pair with Given Difference4925
163Subarray Product Less Than K LeetCode Solution4920
164Last Stone Weight4913
165Add Two Numbers II Leetcode Solution4909
166Majority Element II Leetcode Solution4906
167Lemonade Change Leetcode Solution4905
168Coin Change 2 Leetcode Solution4898
169Design Parking System Leetcode Solution4897
170Subarray Sum Equals K LeetCode Solution4871
171Reverse Words in a String III LeetCode Solution4860
172Delete middle element of a stack4856
173Capacity To Ship Packages Within D Days Leetcode Solution4852
174First negative integer in every window of size k4850
175Find the Row with Maximum Number of 1’s4833
176Form Minimum Number from Given Sequence of D’s and I’s4829
177String Compression4815
178Palindrome Linked List Leetcode Solution4784
179Trapping Rain Water Leetcode Solution4777
180Find All Duplicates in an Array LeetCode Solution4753
181Combinations Leetcode Solution4743
182Word Ladder LeetCode Solution4730
183Repeated Substring Pattern4686
184Iterative Implementation of Quick Sort4682
185Merge Sorted Array LeetCode Solution4681
186Remove Duplicates from Sorted List II LeetCode Solution4675
187Backspace String Compare4674
188Remove Linked List Elements Leetcode Solution4673
189Same Tree LeetCode Solution4658
190Break a Palindrome LeetCode Solution4651
191Monotonic Array LeetCode Solution4642
192Continuous Subarray Sum LeetCode Solution4619
19301 Matrix LeetCode Solution4597
194Single Element in a Sorted Array LeetCode Solution4535
195Merge k Sorted Lists Leetcode Solution4535
196Slowest Key Leetcode Solution4524
197Valid Perfect Square Leetcode Solution4507
198Remove All Occurrences of a Substring LeetCode Solution4502
199Leetcode Permutations4502
200Set Matrix Zeroes Leetcode Solution4448
201Insert Delete GetRandom O(1) Leetcode Solution4441
202Second Most Repeated Word in a Sequence4440
203Rearrange given Array in Maximum Minimum Form4439
204Combination Sum4434
205Find Peak Element LeetCode Solution4428
206Make The String Great Leetcode Solution4421
207The K Weakest Rows in a Matrix Leetcode Solution4410
208Rotate List Leetcode Solution4395
209Kth Largest Element in a Stream Leetcode Solution4390
210Relative Ranks Leetcode Solution4389
211Palindrome Number4389
212Printing brackets in Matrix Chain Multiplication Problem4389
213Convert a Number to Hexadecimal Leetcode Solution4377
214Longest Common Subsequence LeetCode Solution4375
215Time Based Key-Value Store LeetCode Solution4375
216Relative Sort Array Leetcode Solution4348
217Find the Duplicate Element4340
218Subarray Sum Equals k4334
219Find N Unique Integers Sum up to Zero Leetcode Solution4332
220Cuckoo sequence program4332
221Top K Frequent Elements LeetCode Solution4324
222Delete Node in a Linked List Leetcode Solution4323
223Number of Dice Rolls With Target Sum LeetCode Solution4316
224Max Area of Island4316
225Target Sum4312
226Moving Average from Data Stream Leetcode Solution4290
227Prefix to Postfix Conversion4288
228Generate all Binary Strings Without Consecutive 1’s4288
229Permutation in String Leetcode Solution4267
230Maximum Product of Three Numbers LeetCode Solution4260
231LRU Cache LeetCode Solution4252
232Find Leaders in an Array4235
233Check If Two String Arrays are Equivalent Leetcode Solution4231
234N-Queens LeetCode Solution4200
235Letter Combinations of a Phone Number4198
236Minimum Knight Moves LeetCode Solution4187
237Count Good Nodes in Binary Tree Leetcode Solution4180
238Unique Paths II Leetcode Solution4175
239Reverse Only Letters LeetCode Solution4169
240Find Triplet in Array With a Given Sum4155
241Scramble String4154
242Number of Steps to Reduce a Number to Zero Leetcode Solution4149
243Arithmetic Expression Evaluation4146
244Flipping an Image LeetCode Solution4102
245Stock Buy Sell to Maximize Profit4078
246Given two unsorted arrays find all pairs whose sum is x4077
247Minimum swaps required to bring all elements less than or equal to k together4066
248To Lower Case Leetcode Solution4064
249Check If N and Its Double Exist Leetcode Solution4060
250Remove Minimum Characters so that Two Strings Become Anagrams4059
251The kth Factor of n Leetcode Solution4041
252Maximum Population Year LeetCode Solution4039
253Min Cost Climbing Stairs LeetCode Solution4032
254Smallest Positive Number Missing in an Unsorted Array4032
255Student Attendance Record I Leetcode Solution4027
256Top K Frequent Elements4019
257Minimum Operations to convert X to Y4010
258Container With Most Water LeetCode Solution4002
259License Key Formatting Leetcode Solution3988
260Construct Binary Tree from Given Inorder and Preorder Traversals3978
261Next Permutation3976
262Search Suggestions System LeetCode Solution3964
263Prim’s Algorithm3953
264Maximum Subarray Sum using Divide and Conquer3950
265Stone Game LeetCode3940
266Reverse words in a string3915
267Maximum Sum Increasing Subsequence3915
268Find the Number Occurring Odd Number of Times in an Array3904
269Sum of Subarray Ranges Leetcode Solution3903
270Contains Duplicate LeetCode Solution3868
271Top K Frequent Words LeetCode Solution3865
272Min Stack3856
273Find The Duplicate Number3852
274Remove Duplicates from Sorted List LeetCode Solution3842
275Reformat Date LeetCode Solution3828
276Maximize Distance to Closest Person LeetCode Solution3816
277Special Array With X Elements Greater Than or Equal X Leetcode Solution3805
278Find Words That Can Be Formed by Characters Leetcode Solution3775
279BFS for Disconnected Graph3772
280Minimum Characters to be Added at Front to Make String Palindrome3767
281Maximum Depth of Binary Tree Leetcode Solution3766
282Pairs of Songs With Total Durations Divisible by 60 LeetCode Solution3763
283Reverse individual words3756
284Find any one of the multiple repeating elements in read only array3755
285Evaluate Division3748
286Most Frequent Element in an Array3744
287Minimum Path Sum Leetcode Solution3732
288Diagonal Traverse LeetCode Solution3731
289Find if Path Exists in Graph Leetcode Solution3719
290Implement a stack using single queue3715
291Design A Leaderboard Leetcode Solution3709
292Count of index pairs with equal elements in an array3706
293Best Time to Buy and Sell Stock III Leetcode Solution3699
294Sort Elements by Frequency of Occurrences3699
295Reveal Cards In Increasing Order Leetcode Solution3690
296Intersection of Two Arrays3678
297House Robber3675
298Single Number3673
299Last Stone Weight II LeetCode Solution3670
300Arrange given Numbers to Form the Biggest Number II3667
301Longest Common Subsequence3662
302Count Number of Occurrences in a Sorted Array3651
303Remove Nth Node From End of List Leetcode Solution3649
304Minimum number of Merge Operations to make an Array Palindrome3638
305Length of Longest valid Substring3634
306Spiral Matrix II Leetcode Solution3623
307N-th Tribonacci Number Leetcode Solution3619
308Reverse Bits3581
309Diagonal Traversal LeetCode Solution3577
310Invalid Transactions LeetCode Solution3568
311Range Sum Query 2D – Immutable Leetcode Solution3567
312Binary Tree Inorder Traversal LeetCode Solution3563
313Symmetric Tree Leetcode Solution3558
314Sudoku Solver3558
315Find Leaves of Binary Tree LeetCode Solution3544
316Maximum Size Subarray Sum Equals k Leetcode Solution3521
317Shortest Word Distance Leetcode Solution3511
318Special Positions in a Binary Matrix Leetcode Solution3507
319Alien Dictionary LeetCode Solution3502
320Find the Closest Palindrome number3499
321Least Number of Unique Integers after K Removals Leetcode Solution3495
322Brightest Position on Street LeetCode Solution3493
323Mobile Numeric Keypad Problem3466
324Construct BST from its given Level Order Traversal3462
325One Edit Distance LeetCode Solution3459
326Jump Game3455
327Sort Array By Parity II Leetcode Solution3453
328Binary Tree Zigzag Level Order Traversal LeetCode Solution3445
329Lowest Common Ancestor of a Binary Tree Leetcode Solution3437
330Find Index of Closing Bracket for a Given Opening Bracket in an Expression3437
331Partition Array Into Three Parts With Equal Sum Leetcode Solution3435
332Remove All Ones With Row and Column Flips Leetcode Solution3434
333Partition Labels LeetCode Solution3431
334Remove Invalid Parentheses Leetcode Solution3424
335Find Duplicates in an Array in Most Efficient Way3422
336The Celebrity Problem3415
337Round Robin Scheduling3408
338Check whether Strings are K Distance Apart or Not3402
339Next Greater Element III LeetCode Solution3397
340Robot Bounded In Circle LeetCode Solution3391
341Rank Transform of an Array Leetcode Solution3385
342Find Winner on a Tic Tac Toe Game Leetcode Solution3383
343Largest Rectangle in Histogram LeetCode Solution3369
344Clone Graph LeetCode Solution3368
345Reverse Nodes in k-Group LeetCode Solution3354
346Paint House LeetCode Solution3351
347Pair of Positive Negative Values in an Array3348
348Next Permutation LeetCode Solution3345
349Minimum operation to make all elements equal in array3343
350Invert Binary Tree LeetCode Solution3334
351Count of Triplets With Sum Less than Given Value3334
352Unique Paths3319
353Minimum Moves to Equal Array Elements Leetcode Solution3315
354Maximum Circular Subarray Sum3312
355Tug of War3308
356Regular Expression Matching Regular Expression Matching LeetCode Solution3300
357Longest subarray not having more than K distinct elements3298
358Range Sum of BST LeetCode Solution3296
359Minimum Cost to Hire K Workers3296
360Minimum Depth of Binary Tree Leetcode Solution3295
361Minimum Time Visiting All Points Leetcode Solution3294
362String Matching in an Array Leetcode Solution3284
363Maximal Square3283
364Merge Two Sorted Linked Lists3277
365Bitwise AND of Numbers Range LeetCode Solution3270
366Painting Fence Algorithm3267
367K Empty Slots LeetCode3267
368Check if a given array contains duplicate elements within k distance from each other3264
369Find Top K (or Most Frequent) Numbers in a Stream3263
370Smallest Subarray with k Distinct Numbers3262
371Hamming Distance Leetcode Solution3258
372Maximum Length of a Concatenated String with Unique Characters Leetcode Solution3253
373Find minimum difference between any two elements3252
374Longest Common Prefix using Trie3245
375Dijkstra Algorithm3245
376Best Time to Buy and Sell Stock with Cooldown Leetcode Solution3238
377Split Linked List in Parts Leetcode Solution3231
378Find the subarray with least average3230
379Minimum Time to Collect All Apples in a Tree LeetCode Solution3224
380Number of Smaller Elements on Right Side3222
381Longest subsequence such that difference between adjacents is one3220
382Maximum Subarray3220
383Non-decreasing Array LeetCode Solution3219
384Number of Islands II LeetCode Solution3213
385Sliding Window Technique3211
386Find the First and Second Smallest Elements3210
387Find Maximum Level sum in Binary Tree3208
388Combination Sum IV LeetCode Solution3206
389Sort a stack using a temporary stack3205
390Transpose Graph3204
391Design Browser History LeetCode Solution3202
392Permutation Sequence LeetCode Solution3202
393Common elements in all rows of a given matrix3196
394First Circular Tour to Visit all the Petrol Bunks3182
395Minimize Maximum Pair Sum in Array LeetCode Solution3178
396Find the Smallest Divisor given a Threshold Leetcode Solution3176
397LRU Cache Implementation3176
398Ugly Number II LeetCode Solution3175
399Maximum Number of Occurrences of a Substring Leetcode Solution3172
400Missing Element in Sorted Array LeetCode Solution3172
401Minimum Number of Steps to Make Two Strings Anagram Leetcode Solutions3171
402Given an Array of Pairs Find all Symmetric Pairs in it3171
403Implementation of Deque using circular array3164
404Longest Substring with At Most K Distinct Characters LeetCode Solution3161
405Integer Break LeetCode Solution3160
406Unique Paths III LeetCode Solution3158
407Invert Binary Tree LeetCode Solution3154
408Path With Maximum Minimum Value LeetCode Solution3154
409Queries for counts of array elements with values in given range3146
410Graph Valid Tree LeetCode Solution3144
411Longest Palindrome can be Formed by Removing or Rearranging Characters3141
412LRU Cache Leetcode Solution3140
413Priority Queue using doubly linked list3131
414Convert Sorted Array to Binary Search Tree LeetCode Solutions3118
415Find the Peak Element from an Array3113
416Find duplicates in a given array when elements are not limited to a range3112
417Stone Game II Leetcode3112
418K Closest Points to Origin Leetcode Solution3102
419Word Search3096
420Minesweeper LeetCode Solution3089
421Consecutive Characters LeetCode Solution3085
422Max stack3083
423Top View of Binary Tree3083
424Insert Interval Leetcode Solution3078
425Maximum Consecutive Numbers Present in an Array3076
426Toeplitz Matrix3074
427Kth Smallest Element in a BST Leetcode Solution3065
428Partition List Leetcode Solution3057
429Replace Elements with Greatest Element on Right Side Leetcode Solution3057
430Decompress Run-Length Encoded List Leetcode Solution3056
431Odd Even Linked List Leetcode Solution3054
432Validate Stack Sequences LeetCode Solution3050
433Can Make Arithmetic Progression From Sequence Leetcode Solution3049
434Stack Permutations (Check if an array is stack permutation of other)3049
435Design a stack that supports getMin() in O(1) time and O(1) extra space3045
436Snakes and Ladders LeetCode Solution3044
437Sort elements by frequency3042
438Restore IP Addresses Leetcode Solution3041
439Expression Contains Redundant Bracket or Not3038
440Binary Tree Maximum Path Sum LeetCode Solution3036
441Kruskal Algorithm3027
442Minimum Absolute Difference in BST Leetcode Solution3023
443Number of Closed Islands Leetcode Solution3021
444Nth Catalan Number3019
445Search in a Binary Search Tree Leetcode Solution3010
446Sequences of given length where every element is more than or equal to twice of previous3007
447Priority Queue in C++3002
448Search a 2D Matrix II Leetcode Solution3001
449Rearrange array such that even positioned are greater than odd2998
450Flood Fill LeetCode2997
451Recursion2994
452Move All the Zeros to the End of the Given Array2994
453Substring with Concatenation of All Words Leetcode Solution2991
454Sorting array using Stacks2984
455Longest Common Prefix using Sorting2975
456Kth Non-repeating Character2974
457Is Graph Bipartite? LeetCode Solution2966
458Find Minimum in Rotated Sorted Array II LeetCode Solution2964
459Postfix to Prefix Conversion2964
460Integer to English words2963
461Find a Peak Element II LeetCode Solution2962
462Palindrome Substring Queries2961
463Gold Mine Problem2959
464Number Complement Leetcode Solution2953
465Vertical Order Traversal of Binary Tree LeetCode Solution2952
466Path Sum II LeetCode Solution2950
467Distance of nearest cell having 1 in a binary matrix2950
468Check if Two given Strings are Isomorphic to each other2941
469Insert into a Binary Search Tree Leetcode Solution2925
470Reverse a linked list2919
471Number of Days Between Two Dates LeetCode Solution2917
472Convert Sorted Array to Binary Search Tree Leetcode Solution2910
473Minimum Path Sum2909
474How to Implement Stack Using Priority Queue or Heap?2907
475Majority Element2907
476Find All Possible Recipes from Given Supplies LeetCode Solution2906
477Queries for GCD of all numbers of an array except elements in a given range2906
478Best Time to Buy and Sell Stock2900
4794Sum2896
4803 Sum2894
481Cells with Odd Values in a Matrix LeetCode Solution2890
482Shortest Completing Word Leetcode Solution2890
483Multiplication of Two Matrices2885
484Balanced Expression with Replacement2882
485Shortest Palindrome2877
486Find Pythagorean Triplets from Array2877
487Count Submatrices With All Ones LeetCode Solution2873
488Find a Fixed Point in a Given Array2873
489Tiling Problem2871
490Trapping Rain Water LeetCode Solution2871
491Intersection of Two Linked Lists LeetCode Solution2869
492Longest Increasing Path in a Matrix LeetCode Solution2868
493Scramble String LeetCode Solution2865
494Minimum Number of Taps to Open to Water a Garden LeetCode Solution2862
495High Five LeetCode Solution2857
496Design Hit Counter LeetCode Solution2857
497Rearrange an array in order – smallest, largest, 2nd smallest, 2nd largest2853
498The Stock Span Problem2853
499Check If Array Pairs Are Divisible by k LeetCode Solution2850
500Kth ancestor of a node in binary tree2846
501Sliding Window Maximum LeetCode Solution2844
502Find Median from Data Stream LeetCode Solution2834
503Custom Sort String Leetcode Solution2827
504Sort Colors2827
505Interval Tree2822
506Implement Trie (Prefix Tree) Leetcode Solution2821
507Reorder Data in Log Files LeetCode Solution2820
508Largest rectangular sub-matrix whose sum is 02819
509Spiral Matrix III LeetCode Solution2815
510Camelcase Matching Leetcode Solution2814
511Find the first Repeating Number in a Given Array2805
512Insert Node in the Sorted Linked List2804
513Sliding Window Median Leetcode Solution2801
514Generate all Binary Strings from Given Pattern2800
515Detect a loop in the Linked List2796
516Sieve of Eratosthenes2788
517Evaluate Reverse Polish Notation LeetCode Solution2786
518Sort an array according to the order defined by another array2785
519Pancake Sorting Problem2781
520Divide Chocolate LeetCode Solution2779
521Merge Two Binary Trees LeetCode Solution2779
522Count subarrays having total distinct elements same as original array2766
523Letter Case Permutation2751
524Analyze User Website Visit Pattern LeetCode Solution2748
525Perfect Squares LeetCode Solution2747
526Check if Array Contains Contiguous Integers With Duplicates Allowed2747
527How to Create Mergable Stack?2747
528Fibonacci Number LeetCode Solution2741
529Coin Change Problem2739
530Different Ways to Add Parentheses Leetcode Solution2737
531Print all Palindromic Partitions of a String2736
532Fibonacci numbers2735
533Longest Common Prefix using Divide and Conquer2735
534Minimum Bracket Reversals2733
535Guess Number Higher or Lower II2731
536Best Time to Buy and Sell Stock with Transaction Fee Leetcode Solution2730
537Determine Whether Matrix Can Be Obtained By Rotation LeetCode Solution2728
538N queen problem2726
539Maximum Sum of Non Consecutive Elements2726
540Count Possible Triangles2721
541Palindrome Permutation LeetCode Solution2720
542Race Car LeetCode Solution2718
543Minimum Height Trees2708
544LCS (Longest Common Subsequence) of three strings2705
545Merge Overlapping Intervals2705
546The Maze III LeetCode Solution2702
547Largest Subarray with Equal Number of 0’s and 1’s2700
548Number of Distinct Islands Leetcode Solution2697
549Subset sum problem2696
550Decode String2691
551Path Crossing Leetcode Solution2680
552Count items common to both the lists but with different prices2679
553Group Anagrams2675
554Longest Substring with At Least K Repeating Characters LeetCode Solution2674
555Maximum Number of Ways to Partition an Array LeetCode Solution2672
556Find maximum length Snake sequence2665
557Maximum Element in an Array which is Increasing and then Decreasing2664
558Find a Sorted Subsequence of size 32661
559Maximum Length of Chain Pairs2658
560Recover Binary Search Tree Leetcode Solution2655
561Longest Repeated Subsequence2655
562Find the Minimum Element in a Sorted and Rotated Array2655
563Queue based approach for first non-repeating character in a stream2654
564Shifting Letters LeetCode Solution2650
565Champagne Tower LeetCode Solution2645
566First missing positive2645
567Build an Array With Stack Operations Leetcode Solution2644
568Convert BST to Min Heap2638
569Find the two Numbers with Odd Occurrences in an Unsorted Array2631
570Minimum Jumps to Reach Home LeetCode Solution2629
571Find if an Expression has Duplicate Parenthesis or Not2627
572Minimum Height Trees LeetCode Solution2625
573Sort a stack using recursion2621
574Nearest Exit from Entrance in Maze LeetCode Solution2620
575Iterative Method to find Height of Binary Tree2615
576Decode Ways2615
577Make Two Arrays Equal by Reversing Sub-arrays Leetcode Solution2614
578Find the Lost Element From a Duplicated Array2614
579Number of Equivalent Domino Pairs Leetcode Solution2612
580Edit Distance LeetCode Solution2609
581Valid Boomerang Leetcode Solution2609
582Palindrome Partitioning Leetcode Solution2607
583K-th Distinct Element in an Array2607
584Sliding Window Maximum2605
585Implement Two Stacks in an Array2604
586Jump Game IV LeetCode Solution2602
587Rectangle Overlap LeetCode Solution2601
588Contains Duplicate2600
589Contiguous Array LeetCode Solution2599
590Most Stones Removed with Same Row or Column LeetCode Solution2575
591Subarrays with K Different Integers Leetcode Solution2573
592Queue using Stacks2569
593Reorder an Array According to the Given Indexes2564
594Distance Between Bus Stops Leetcode Solution2562
595Morris Traversal2562
596Monotonic Array Leetcode Solution2552
597Recover Binary Search Tree2550
598Design a Stack With Increment Operation Leetcode Solution2544
599Minimum number of jumps to reach end2542
600Find the Town Judge LeetCode Solution2537
601Word Break2535
602Construction of Longest Increasing Subsequence (N log N)2532
603Palindrome Permutations of a String2529
604Sort a String According to Another String2528
605Number of Subsequences That Satisfy the Given Sum Condition LeetCode solution2525
606Rearrange Spaces Between Words Leetcode Solution2525
607Maximum Depth of N-ary Tree Leetcode Solution2520
608Sorted Linked List to Balanced BST2519
609Palindromic Substrings Leetcode Solution2507
610Possible Bipartition LeetCode Solution2504
611Number of palindromic paths in a matrix2502
612Maximum Score After Splitting a String Leetcode Solution2496
613Best Meeting Point LeetCode Solution2495
614Smallest Good Base2493
615Find Largest Value in Each Tree Row LeetCode Solution2490
616Merge Overlapping Intervals II2490
617Reach a Number LeetCode Solution2489
618Implement strStr() LeetCode Solution2488
619Valid Parentheses Leetcode Solution2483
620Merge Two Balanced Binary Search Trees2475
621Mean of Array After Removing Some Elements Leetcode Solution2473
622Maximize Elements Using Another Array2470
623All Possible Full Binary Trees LeetCode Solution2465
624Maximum sum rectangle in a 2D matrix2465
625Maximum Product of Splitted Binary Tree LeetCode Solution2461
626Check if the given array can represent Level Order Traversal of Binary Search Tree2460
627Binary Tree zigzag level order Traversal2460
628Maximum Frequency Stack Leetcode Solution2453
629Valid Sudoku2452
630Best Time to Buy and Sell Stock IV LeetCode Solution2449
631Find the Subarray of given length with Least Average2449
632Find the First Circular Tour that visits all the Petrol Pumps2447
633Swapping Nodes in a Linked List Leetcode Solution2445
634Perform String Shifts Leetcode2445
635Design Skiplist LeetCode Solution2443
636A Space Optimized DP solution for 0-1 Knapsack Problem2433
637Detect Capital Leetcode Solution2432
638Caesar Cipher2431
639Find Median from data Stream2423
640Brick Wall LeetCode Solution2419
641Find all pairs (a, b) in an array such that a % b = k2413
642Pair with given product2409
643Lowest Common Ancestor of a Binary Search Tree Leetcode Solution2408
644Word Pattern2406
645Count pair with Given Sum2405
646Merge K Sorted Arrays and Print Sorted Output2403
647My Calendar I LeetCode Solution2399
648Palindrome Permutation2392
649Convert Sorted List to Binary Search Tree2392
650Check for Balanced Parentheses in an Expression2391
651Find First and Last Position of Element in Sorted Array LeetCode Solution2383
652Binary Tree Right Side View LeetCode Solution2364
653Group Multiple Occurrence of Array Elements Ordered by first Occurrence2356
654Populating Next Right Pointers in Each Node Leetcode Solution2353
655Huffman Coding2353
656Add two numbers2353
657Segregate 0s and 1s in an Array2346
658Construct BST from given Preorder Traversal2346
659Split Array Into Consecutive Subsequences2341
660Level order Traversal in Spiral Form2335
661How to Efficiently Implement k Stacks in a Single Array?2333
662All Unique Triplets that Sum up to a Given Value2330
663Largest Sum Contiguous Subarray2329
664Length of Longest Fibonacci Subsequence2329
665Print Fibonacci sequence using 2 variables2328
666Find Zeros to be Flipped so that Number of Consecutive 1’s is Maximized2328
667Count ways to reach the nth stair using step 1, 2 or 32325
668Count Sub Islands LeetCode Solution2324
669Find whether a subarray is in form of a mountain or not2319
670Maximum Number of Chocolates to be Distributed Equally Among k Students2316
671Web Crawler LeetCode Solution2312
672Check if a Linked list of Strings form a Palindrome2312
673Minimum time required to rot all oranges2309
674Arithmetic Slices II – Subsequence LeetCode Solution2307
675Find all triplets with zero sum2306
676Longest Subarray Having Count of 1s One More than Count of 0s2301
677Counting Bits2301
678Print all subarrays with 0 sum2299
679Remove brackets from an algebraic string containing + and – operators2296
680Validate Binary Search Tree2296
681Isomorphic Strings LeetCode Solution2293
682Partition to K Equal Sum Subsets Leetcode Solution2293
683Shortest Path in a Grid with Obstacles Elimination LeetCode Solution2292
684Populating Next Right Pointers in Each Node2292
685Minimum Sum Path in a Triangle2289
686Sort 0s 1s and 2s in an Array2289
687Find four elements that sum to a given value (Hashmap)2285
688Minimum Swaps to Group All 1’s Together Leetcode Solution2276
689Rearrange Array such that arr[i] >= arr[j] if i is even and arr[i] <= arr[j] if i is odd and j < i2274
690Count Distinct Elements in Every Window of Size K2272
691Partition Problem2260
692Swap Kth Node from beginning with Kth Node from End2256
693Concatenation of Array LeetCode Solution2255
694Remove Palindromic Subsequences Leetcode Solution2251
695Heap Sort2249
696Bubble sort using two Stacks2248
697Check if String Follows Order of Characters by a Pattern or not2248
698Range Sum Query 2D – Immutable LeetCode Solution2244
699Maximize Sum of Array after K Negations Leetcode Solution2234
700Elements Appear more than N/K times in Array2228
701Happy Number2225
702Binary Tree to Binary Search Tree Conversion2221
703Finding K closest element2206
704Count Minimum Steps to Get the given Array2205
705String comparison containing wildcards2200
706Count Good Nodes in Binary Tree LeetCode Solution2198
707Difference Array | Range update query in O(1)2193
708Rotate Array2183
709Maximum Product Subarray II2177
710Find All Pairs With a Given Difference2176
711Inorder Successor of a node in Binary Tree2175
712Maximum Distance in Array2170
713Increasing Subsequence of Length three with Maximum Product2169
714Find Maximum of Minimum for Every Window Size in a Given Array2167
715Contiguous Array Leetcode2166
716Sum Root to Leaf Numbers LeetCode Solution2164
717Find Duplicate Subtrees2159
718Queries on Probability of Even or Odd Number in given Ranges2158
719Container with Most Water2157
720Rearrange an Array Such that arr[i] is equal to i2156
721Nested List Weight Sum II LeetCode Solution2154
722An Interesting Method to generate Binary Numbers from 1 to n2153
723Linked List Cycle2152
724Find pairs with given sum such that elements of pair are in different rows2152
725MiniMax Algorithm2146
726Merge Two Sorted Lists Leetcode2145
727Breadth First Search (BFS) for a Graph2133
728Reverse Nodes in K-Group2132
729Iterative Depth First Traversal of Graph2130
730Longest Common Prefix Using Binary Search II2128
731Score of Parenthesis LeetCode Solution2124
732Queue Reconstruction by Height2123
733Symmetric Tree2123
734Climbing stairs2123
735Longest Increasing Subsequence2122
736Reorder Array Using Given Indexes2120
737Parallel Courses II LeetCode Solution2119
738Minimum Swaps to Make Strings Equal Leetcode Solution2109
739Remove duplicates from sorted array2107
740Minimum Cost to Move Chips to The Same Position LeetCode Solution2106
741Substring With Concatenation Of All Words2105
742Alien Dictionary2102
743Delete Nodes and Return Forest Leetcode Solution2101
744Merge K Sorted Linked Lists2101
745Root to Leaf path with target sum Leetcode Solutions2099
746Iterative Preorder Traversal2089
747Check if Two Expressions With Brackets are Same2089
748Delete Nth node from the end of the given linked list2084
749Union and Intersection of two Linked Lists2082
750Construct Binary Tree from Preorder and Postorder Traversal LeetCode Solution2080
751Deletion in a Binary Tree2080
752Kill Process LeetCode Solution2077
753Longest Common Prefix Word by Word Matching2068
754Check if a queue can be sorted into another queue using a stack2066
755Minimum Number of Arrows to Burst Balloons LeetCode Solution2063
756Merging Intervals2062
757Smallest Range II Leetcode Solution2057
758K maximum sums of overlapping contiguous sub-arrays2057
759Minimum Distance Between BST Nodes Leetcode Solution2054
760Maximum size subarray sum equals k2054
761Check if any two intervals overlap among a given set of intervals2053
762Range LCM Queries2049
763Find the first repeating element in an array of integers2048
764Flatten 2D Vector LeetCode Solution2047
765Print a Binary Tree in Vertical Order2042
766Filter Restaurants by Vegan-Friendly, Price and Distance Leetcode Solution2041
767New 21 Game2039
768Non-overlapping sum of two sets2038
769Find subarray with given sum (Handles Negative Numbers)2037
770Minimum Size Subarray Sum2035
771Maximum difference between two elements such as larger element comes after smaller2029
772Find K Closest Elements LeetCode Solution2028
773Partition Equal Subset Sum2028
774Verify Preorder Serialization of a Binary Tree2016
775Construct Binary Tree from given Parent Array representation2013
776Maximum Product Subarray2013
777Matrix Chain Multiplication2009
778Sort Array by Increasing Frequency Leetcode Solution2008
779Find the Difference Leetcode Solution2008
780Vertical sum in a given binary tree2008
781Reservoir Sampling2002
782Friends Of Appropriate Ages LeetCode Solution2001
783Defanging an IP Address LeetCode Solution1999
784Boundary Traversal of binary tree1995
785Minimum Remove to Make Valid Parentheses LeetCode Solution1988
786Find Maximum Sum Possible Equal Sum of Three Stacks1988
787Check if a given array can represent Preorder Traversal of Binary Search Tree1975
788Sorting a K Sorted Array1974
789Flatten Binary Tree to Linked List LeetCode Solution1972
790The Painter’s Partition Problem1971
791Valid Parenthesis String1970
792Valid Anagrams1968
793Find K Length Subarray of Maximum Average1968
794Pancake Sorting1964
795Peak Index in a Mountain Array LeetCode Solution1962
796Find Three Element From Different Three Arrays Such That a + b + c = sum1959
797Boolean Parenthesization Problem1958
798Level order traversal using two Queues1953
799Find Sum of all unique sub-array sum for a given array1947
800Palindrome Partitioning1944
801Count pairs from two linked lists whose sum is equal to a given value1942
802BFS vs DFS for Binary Tree1937
803Sum of f(a[i], a[j]) over all pairs in an array of n integers1932
804Given a binary tree, how do you remove all the half nodes?1930
805Remove Duplicates from Sorted List II1928
806Number of siblings of a given Node in n-ary Tree1928
807Largest Submatrix With Rearrangements LeetCode Solution1927
808Check Completeness of a Binary Tree LeetCode Solution1923
809Check if all levels of two Binary Tree are anagrams or not1921
810Valid Triangle Number LeetCode Solution1918
811Count number of triplets with product equal to given number1918
812Super Ugly Number1918
813Employee Importance LeetCode Solution1916
814Third Maximum Number Leetcode Solution1911
815Hamming Distance1905
816Unique Binary Search Trees LeetCode Solution1902
817Isomorphic Strings1902
818Kth Smallest Element in a Sorted Matrix LeetCode Solution1901
819Number Of Longest Increasing Subsequence1901
820Tree Traversal (Preorder, Inorder & Postorder)1899
821Longest Palindromic Subsequence1898
822Lowest Common Ancestor1897
823Print All Distinct Elements of a Given Integer Array1894
824Level of Each node in a Tree from source node1891
825Create Maximum Number1890
826Count and Say1888
827Balanced Binary Tree1886
828Largest divisible pairs subset1885
829Products of ranges in an array1885
830Find Peak Element1885
831Find Element Using Binary Search in Sorted Array1885
832Unique Binary Search Trees1882
833Array Nesting Leetcode Solution1880
834Find distance between two nodes of a Binary Tree1880
835Largest BST Subtree LeetCode Solution1878
836Print all triplets in sorted array that form AP1878
837Closest Leaf in a Binary Tree LeetCode Solution1877
838Maximum subsequence sum such that no three are consecutive1877
839Find the largest multiple of 31872
840Median of Two Sorted Arrays1872
841Find Common Characters Leetcode Solution1870
842Check if two nodes are on the same path in a Tree1864
843Distinct Subsequences1862
844Minimum insertions to form a palindrome with permutations allowed1861
845Bold Words in String LeetCode Solution1852
846Arrange given numbers to form the biggest number1852
847Maximum number of segments of lengths a, b and c1849
848Topological Sorting1849
849Find Smallest Range Containing Elements from k Lists1848
850Newman-Conway Sequence1847
851Infix to Postfix1847
852Binary array after M range toggle operations1843
853Subset Sum Problem in O(sum) space1842
854Valid Number1833
855Four Elements that Sum to Given1832
856Merging Two Sorted Arrays1830
857Find Nth Node1827
858Compare Strings by Frequency of the Smallest Character Leetcode Solution1825
859Shuffle an Array1825
860Next Greater Element in an Array1820
861Maximum Population Year LeetCode Solution1818
862Sort Elements by Frequency II1817
863Lower Case To Upper Case1811
864First Bad Version1804
865Transform a BST to Greater sum Tree1803
866Missing Number1801
867Path Sum1796
868Insert Delete GetRandom1795
869Contiguous Array1793
870Stone Game IV LeetCode Solution1789
871Maximum Sum of 3 Non-Overlapping Subarrays1788
872Sentence Screen Fitting LeetCode Solution1785
873Largest subarray with equal number of 0s and 1s1785
874Averages of Levels in Binary Tree1784
875Binary Tree Longest Consecutive Sequence LeetCode Solution1781
876Encoded String With Shortest Length LeetCode Solution1780
877Bottom View of a Binary Tree1778
878Stone Game IV LeetCode Solution1777
879Print Right View of a Binary Tree1775
880Merge Two Sorted Arrays1774
881Valid Triangle Number LeetCode Solution1773
882Count Primes in Ranges1770
883Maximum Side Length of a Square with Sum Less than or Equal to Threshold LeetCode Solution1769
884Find Largest d in Array such that a + b + c = d1769
885Minimum sum of squares of character counts in a given string after removing k characters1766
886Trapping Rain Water II LeetCode Solution1765
887Height of a generic tree from parent array1765
888Red-Black Tree Introduction1760
889Minimum Swaps To Make Sequences Increasing LeetCode Solution1758
890Closest Binary Search Tree Value Leetcode Solution1756
891Kth Smallest Number in Multiplication Table Leetcode Solution1755
892Iterative Postorder Traversal Using Two Stacks1748
893Integer to Roman1747
894Permutations of a Given String Using STL1746
895Longest Bitonic Subsequence1743
896Find unique character in a string1743
897Range Minimum Query (Square Root Decomposition and Sparse Table)1738
898Next Greater Element II LeetCode Solution1736
899Valid Perfect Square LeetCode Solution1734
900Friends Pairing Problem1732
901Serialize and Deserialize Binary Tree LeetCode Solution1731
902Rearrange an array such that ‘arr[j]’ becomes ‘i’ if ‘arr[i]’ is ‘j’1724
903Segment Tree1724
904Diagonal Traversal of Binary Tree1718
905Reorganize String1714
906Diameter of N-Ary Tree LeetCode Solution1712
907Range Sum Query using Sparse Table1707
908Binary Search Tree Delete Operation1707
909Orderly Queue LeetCode Solution1702
910Next greater element1697
911Step-By-Step Directions From a Binary Tree Node to Another LeetCode Solution1692
912Maximum difference between frequency of two elements such that element having greater frequency is also greater1692
913Swap Nodes In Pairs1692
914Level Order Traversal of Binary Tree1678
915Serialize and Deserialize Binary Tree1675
916Koko Eating Bananas LeetCode Solution1673
917Constant time range add operation on an array1672
918Find Minimum In Rotated Sorted Array1672
919Reverse a Path in BST using Queue1664
920Valid Tic-Tac-Toe State LeetCode Solution1661
921Maximum difference between first and last indexes of an element in array1658
922Best Meeting Point LeetCode Solution1655
923Total Hamming Distance LeetCode Solution1653
924Maximum Product Subarray1653
925Largest Plus Sign Leetcode Solution1647
926Advantages of BST over Hash Table1647
927Find the smallest binary digit multiple of given number1644
928Convert BST into a Min-Heap without using array1644
929The Number of Weak Characters in the Game LeetCode Solution1637
930Maximum Product Subarray1636
931Find minimum number of merge operations to make an array palindrome1636
932Array Queries for multiply replacements and product1622
933Maximum Sum Increasing Subsequence1622
934Longest Increasing Consecutive Subsequence1620
935Edit Distance1618
936A program to check if a binary tree is BST or not1611
937Count the Pairs at Same Distance as in English Alphabets1611
938Greatest Sum Divisible by Three LeetCode Solution1607
939Design Add and Search Words Data Structure LeetCode Solution1606
940Collect maximum points in a grid using two traversals1606
941Image Overlap LeetCode Solution1604
942Shuffle a given Array1604
943Print n terms of Newman-Conway Sequence1603
944Find the node with minimum value in a Binary Search Tree1601
945Write Code to Determine if Two Trees are Identical1598
946K’th Largest element in BST using constant extra space1595
947Dividing Array into Pairs With Sum Divisible by K1595
948Range Queries for Longest Correct Bracket Subsequence1592
949Group Shifted Strings Leetcode Solution1591
950Design Underground System Leetcode Solution1589
951Longest Substring Without Repeating Characters Leetcode Solution1586
952Factorial Trailing Zeroes LeetCode Solution1585
953Write a function to get the intersection point of two Linked Lists1583
954Check if an Array is Stack Sortable1582
955Print Next Greater Number of Q queries1580
956Moving Stones Until Consecutive Leetcode Solution1575
957Queries on XOR of greatest odd divisor of the range1573
958Merge Sort1572
959Insert into a Sorted Circular Linked List LeetCode Solution1563
960Clone a Binary Tree with Random Pointers1558
961Power of Two1554
962Binary Search Tree Search and Insertion1552
963K’th Largest Element in BST when modification to BST is not allowed1551
964Print modified array after multiple array range increment operations1550
965Lowest Common Ancestor in Binary Search Tree1547
966Swim in Rising Water LeetCode Solution1546
967Form Minimum Number From Given Sequence1544
968Numbers with prime frequencies greater than or equal to k1539
969Maximum Array from Two given Arrays Keeping Order Same1535
970Form minimum number from given sequence1528
971Guess The Word1524
972Priority Queue1516
973Closest Binary Search Tree Value II LeetCode Solution1515
974Count even length binary sequences with same sum of first and second half bits1514
975Check for Palindrome after every character replacement Query1513
976Cutting a Rod1510
977Check if X can give change to every person in the Queue1506
978Merge Sorted Array1505
979Check if each internal node of a BST has exactly one child1496
980Find maximum average subarray of k length1496
981Excel Sheet Column Number LeetCode Solution1495
982K Empty Slots1489
983Longest Common Prefix using Character by Character Matching1489
984Print all Possible Ways to Break a String in Bracket Form1488
985Construct Complete Binary Tree from its Linked List Representation1484
986Count and Toggle Queries on a Binary Array1474
987Queries for Decimal Values of Subarrays of a Binary Array1474
988Minimum Possible Integer After at Most K Adjacent Swaps On Digits LeetCode Solution1473
989Number of elements less than or equal to a given number in a given subarray1471
990Count Pairs Whose Products Exist in Array1465
991Minimum Moves to Equal Array Elements LeetCode Solution1461
992Queries for Number of Distinct Elements in a Subarray1461
993Sorted Array to Balanced BST1460
994Insert Delete GetRandom O(1) – Duplicates allowed LeetCode Solution1452
995Number of Orders in the Backlog Leetcode Solution1452
996Merge two BSTs with limited extra space1451
997Kth Smallest Element in a BST1450
998Find postorder traversal of BST from preorder traversal1449
999Print Ancestors of a Given Binary Tree Node Without Recursion1447
1000Binary Search Tree1446
1001Sum of Left Leaves LeetCode Solution1441
1002Decrease Elements To Make Array Zigzag LeetCode Solution1439
1003Unique Paths II1438
1004Search in Sorted Rotated Array1438
1005Regular Expression Matching1426
1006How to print maximum number of A’s using given four keys1425
1007Graph Cloning1423
1008Palindrome Partitioning1423
1009Excel Sheet Column Title LeetCode Solution1415
1010Check given array of size n can represent BST of n levels or not1404
1011Maximum weight transformation of a given string1401
1012Find Maximum Depth of Nested Parenthesis in a String1397
1013Shortest Unsorted Continuous Subarray LeetCode Solution1396
1014Symmetric Tree LeetCode Solution Leetcode Solution1389
1015Kth Smallest Product of Two Sorted Arrays LeetCode Solution1374
1016Random Pick Index LeetCode Solution1371
1017Maximum Depth Of Binary Tree1367
1018Data Structure Designing1365
1019Convert a BST to a Binary Tree such that sum of all greater keys is added to every key1341
1020Iterative method to find ancestors of a given binary tree1339
1021Search an Element in Sorted Rotated Array1331
1022Minimum Number of Operations to Move All Balls to Each Box LeetCode Solution1328
1023Find the Town Judge LeetCode Solution1309
1024Binary Tree to Binary Search Tree Conversion using STL set1284
1025Next Greater Element I Leetcode Solution1255
1026Maximum Binary Tree1246
1027Print Maximum Length Chain of Pairs1213
1028Find k-th smallest element in BST (Order Statistics in BST)1209
1029Peeking Iterator LeetCode Solution1190
1030Find Two Non-overlapping Sub-arrays Each With Target Sum LeetCode Solution1186
1031Flatten Binary Tree to Linked List LeetCode Solution1179
Translate »