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 Solution37440
2Maximum occurring character in a string18307
3Plus One Leetcode Solution17308
4Valid Parentheses LeetCode Solution16905
53Sum Leetcode Solution14694
6First Repeating Element13710
7Single Number Leetcode Solution12999
8Count Primes Leetcode Solutions12814
9Pow(x, n) Leetcode Solution12344
10Merge Sorted Arrays Leetcode Solution12215
11Sqrt(x) Leetcode Solution12144
12Meeting Rooms II LeetCode Solution11625
13Concatenation of Array LeetCode Solution11215
14Roman to Integer Leetcode Solution10535
15Contains Duplicate II Leetcode Solution10457
16Palindrome Number LeetCode Solution10264
17Search Insert Position Leetcode Solution10214
18Valid Palindrome Leetcode Solution10050
19Reverse Vowels of a String Leetcode Solution9776
20Jump Game Leetcode Solution9718
21Intersection of Two Arrays II Leetcode Solution9450
22Number of Good Pairs Leetcode Solution9416
23Kids With the Greatest Number of Candies Leetcode Solution9316
24Spiral Matrix LeetCode Solution9261
25House Robber Leetcode Solution9249
26Longest Substring Without Repeating Characters LeetCode Solution9139
27Add Binary Leetcode Solution9083
28Find the Maximum Repeating Number in Array8960
29Text Justification LeetCode Solution8825
30Number Of 1 bits8572
31Longest Palindromic Substring LeetCode Solution8566
32Maximum Subarray Leetcode Solution8535
33Jewels and Stones Leetcode Solution8416
34Power of Two Leetcode Solution8354
35Remove Duplicates from Sorted Array Leetcode Solution8308
36Permutations Leetcode Solution8252
37Shuffle String Leetcode Solution8146
38Min Stack Leetcode Solution8098
39Find All Numbers Disappeared in an Array Leetcode Solution8090
40Daily Temperatures Leetcode Solution7967
41Move Zeroes LeetCode Solution7946
42Word Search Leetcode Solution7898
43Number of Islands LeetCode Solution7871
44Next Permutation Leetcode Solution7869
45Kth Missing Positive Number Leetcode Solution7851
46Maximum Profit in Job Scheduling Leetcode Solution7818
47Longest Common Prefix Leetcode Solution7774
48Median of Two Sorted Arrays LeetCode Solution7738
49Frog Jump Leetcode Solution7728
50Third Maximum Number Leetcode Solution7651
51Running Sum of 1d Array Leetcode Solution7616
52Find Minimum Distance Between Two Numbers in an Array7547
53Next Greater Element I Leetcode Solution7495
54Search in Rotated Sorted Array Leetcode Solution7467
55Can Place Flowers LeetCode Solution7422
56Rotate Image LeetCode Solution7389
57Combination Sum Leetcode Solution7339
58Multiply Strings Leetcode Solution7320
59Shuffle the Array Leetcode Solution7316
60Bulb Switcher LeetCode Solution7283
613Sum Closest LeetCode Solution7229
62Valid Anagram Leetcode Solution7179
63House Robber II Leetcode Solution7167
64Count and Say Leetcode Solution7145
65Missing Number Leetcode Solution6982
66Subarray and Subsequence6975
67Reverse String Without Temporary Variable6938
68Strobogrammatic Number LeetCode Solution6936
69Evaluation of Postfix Expression6921
70Isomorphic Strings Leetcode Solution6907
71Excel Sheet Column Title Leetcode Solution6872
72Koko Eating Bananas Leetcode Solution6853
73Integer to Roman Leetcode Solution6836
74Product of array except self6820
75Rotate String LeetCode Solution6753
76Count Pairs With Given Sum6744
77Find the Difference Leetcode Solution6596
78String to Integer (atoi) LeetCode Solution6584
79Majority Element Leetcode Solution6567
80Happy Number Leetcode Solution6549
81Subtract the Product and Sum of Digits of an Integer Leetcode Solution6528
82Candy LeetCode Solution6523
83Largest Number Leetcode Solution6495
84Find Common Characters Leetcode Solution6472
85Is Subsequence Leetcode Solution6388
86How Many Numbers Are Smaller Than the Current Number Leetcode Solution6335
87Set Matrix Zeroes6316
88Balanced Binary Tree Leetcode Solution6277
89Subset Leetcode6212
90Word Pattern LeetCode Solution6203
91Summary Ranges Leetcode Solution6196
92Find the Town Judge Leetcode Solution6190
93Best Time to Buy and Sell Stock LeetCode Solution6180
94Unique Paths Leetcode Solution6121
95Smallest window in a string containing all characters of another string6080
96Arranging Coins Leetcode Solution6062
97Rearrange Positive and Negative Numbers Alternatively in Array6022
98Sort Colors LeetCode Solution6019
99Binary Search LeetCode Solution6013
100Sort Characters By Frequency LeetCode Solution6011
101Find the Duplicate Number LeetCode Solution5984
102String Compression LeetCode Solution5943
103Find the Winner of the Circular Game LeetCode Solution5940
104A Product Array Puzzle5937
105Asteroid Collision LeetCode Solution5901
106Repeated Substring Pattern LeetCode Solution5886
107Rabin Karp Algorithm5843
108Expression Evaluation5832
109Valid Palindrome II Leetcode Solution5740
110Best Time to Buy and Sell Stock  II Leetcode Solution5736
111Sort Array By Parity LeetCode Solution5732
112Zigzag Conversion LeetCode Solution5709
113Sum of minimum and maximum elements of all subarrays of size k5673
114Group Anagrams LeetCode Solution5662
115Product of Array Except Self LeetCode Solution5641
116Reverse Integer Leetcode Solution5640
117Divide Two Integers Leetcode Solution5623
118Linked List Cycle II LeetCode Solution5611
119Bus Routes Leetcode Solution5518
120Merge Two Sorted Lists Leetcode Solutions5483
121Page Replacement Algorithms in Operating Systems5478
122Matrix Chain Multiplication using Dynamic Programming5449
123Pascal Triangle Leetcode5447
124Kth largest element in an Array Leetcode Solutions5442
125Postfix to Infix Conversion5437
126Employee Free Time LeetCode Solution5415
127Length of Last Word Leetcode Solution5393
128Minimum Cost For Tickets Leetcode Solution5376
129Assign Cookies Leetcode Solution5349
130Generate Parentheses Leetcode Solution5334
131Number of Provinces Leetcode Solution5328
132First element occurring k times in an array5322
133Minimum Steps to reach target by a Knight5303
134Optimal Account Balancing LeetCode Solution5299
135Build Array From Permutation Leetcode Solution5296
136Decode String Leetcode Solution5279
137H-Index Leetcode Solution5276
138Increasing Triplet Subsequence LeetCode Solution5269
139Remove Duplicates from Sorted Array II Leetcode Solution5266
140Implementation of Deque using Doubly Linked List5207
141Convert array into Zig-Zag fashion5202
142Defanging an IP Address Leetcode Solution5162
143Fibonacci Number LeetCode Solution5157
144Robot Room Cleaner Leetcode Solution5088
145Pascal’s Triangle II Leetcode Solution5082
146Swap Nodes in Pairs Leetcode Solutions5033
147KMP Algorithm5024
148First Unique Character in a String LeetCode Solution4999
149Bellman Ford Algorithm4998
150Island Perimeter Leetcode Solution4986
151Max Consecutive Ones Leetcode Solution4945
152K-th Smallest Element in a Sorted Matrix4944
153Check if the Elements of an Array are Consecutive4941
154Subarray with Given Sum4931
155Length of the largest subarray with contiguous elements4917
156Prefix to Infix Conversion4908
157Guess Number Higher or Lower LeetCode Solution4903
158Find First and Last Position of Element in Sorted Array Leetcode Solution4898
159Find Smallest Missing Number in a Sorted Array4893
160OSI Model4882
161Subarray Product Less Than K LeetCode Solution4860
162Last Stone Weight4860
163Add Two Numbers II Leetcode Solution4847
164Lemonade Change Leetcode Solution4845
165Find Pair with Given Difference4840
166Find the Missing Number4838
167Coin Change 2 Leetcode Solution4828
168Majority Element II Leetcode Solution4812
169Reverse Words in a String III LeetCode Solution4810
170Design Parking System Leetcode Solution4799
171Delete middle element of a stack4785
172Capacity To Ship Packages Within D Days Leetcode Solution4780
173Form Minimum Number from Given Sequence of D’s and I’s4771
174First negative integer in every window of size k4767
175Subarray Sum Equals K LeetCode Solution4757
176Find the Row with Maximum Number of 1’s4740
177String Compression4729
178Trapping Rain Water Leetcode Solution4721
179Palindrome Linked List Leetcode Solution4719
180Combinations Leetcode Solution4696
181Find All Duplicates in an Array LeetCode Solution4694
182Word Ladder LeetCode Solution4634
183Remove Duplicates from Sorted List II LeetCode Solution4632
184Backspace String Compare4629
185Iterative Implementation of Quick Sort4621
186Remove Linked List Elements Leetcode Solution4617
187Repeated Substring Pattern4602
188Merge Sorted Array LeetCode Solution4585
189Break a Palindrome LeetCode Solution4571
190Continuous Subarray Sum LeetCode Solution4565
191Same Tree LeetCode Solution4559
192Monotonic Array LeetCode Solution4555
19301 Matrix LeetCode Solution4515
194Slowest Key Leetcode Solution4477
195Merge k Sorted Lists Leetcode Solution4474
196Leetcode Permutations4459
197Remove All Occurrences of a Substring LeetCode Solution4458
198Single Element in a Sorted Array LeetCode Solution4441
199Insert Delete GetRandom O(1) Leetcode Solution4409
200Valid Perfect Square Leetcode Solution4399
201Find Peak Element LeetCode Solution4396
202Rearrange given Array in Maximum Minimum Form4370
203Second Most Repeated Word in a Sequence4353
204Rotate List Leetcode Solution4352
205Make The String Great Leetcode Solution4344
206Convert a Number to Hexadecimal Leetcode Solution4338
207Set Matrix Zeroes Leetcode Solution4331
208The K Weakest Rows in a Matrix Leetcode Solution4331
209Kth Largest Element in a Stream Leetcode Solution4327
210Combination Sum4325
211Longest Common Subsequence LeetCode Solution4319
212Time Based Key-Value Store LeetCode Solution4319
213Relative Ranks Leetcode Solution4319
214Printing brackets in Matrix Chain Multiplication Problem4308
215Palindrome Number4303
216Relative Sort Array Leetcode Solution4296
217Find N Unique Integers Sum up to Zero Leetcode Solution4282
218Target Sum4282
219Number of Dice Rolls With Target Sum LeetCode Solution4281
220Cuckoo sequence program4278
221Top K Frequent Elements LeetCode Solution4274
222Subarray Sum Equals k4257
223Delete Node in a Linked List Leetcode Solution4256
224Max Area of Island4251
225Find the Duplicate Element4247
226Moving Average from Data Stream Leetcode Solution4232
227Generate all Binary Strings Without Consecutive 1’s4225
228LRU Cache LeetCode Solution4216
229Prefix to Postfix Conversion4199
230Permutation in String Leetcode Solution4186
231Maximum Product of Three Numbers LeetCode Solution4186
232Check If Two String Arrays are Equivalent Leetcode Solution4184
233Find Leaders in an Array4161
234Minimum Knight Moves LeetCode Solution4145
235Letter Combinations of a Phone Number4133
236N-Queens LeetCode Solution4129
237Reverse Only Letters LeetCode Solution4128
238Count Good Nodes in Binary Tree Leetcode Solution4110
239Unique Paths II Leetcode Solution4108
240Number of Steps to Reduce a Number to Zero Leetcode Solution4104
241Scramble String4095
242Arithmetic Expression Evaluation4082
243Find Triplet in Array With a Given Sum4076
244Flipping an Image LeetCode Solution4040
245To Lower Case Leetcode Solution4019
246Given two unsorted arrays find all pairs whose sum is x4009
247The kth Factor of n Leetcode Solution4004
248Maximum Population Year LeetCode Solution4002
249Stock Buy Sell to Maximize Profit4002
250Check If N and Its Double Exist Leetcode Solution3998
251Smallest Positive Number Missing in an Unsorted Array3997
252Minimum swaps required to bring all elements less than or equal to k together3984
253Remove Minimum Characters so that Two Strings Become Anagrams3983
254Student Attendance Record I Leetcode Solution3965
255Top K Frequent Elements3964
256Min Cost Climbing Stairs LeetCode Solution3951
257Minimum Operations to convert X to Y3950
258Container With Most Water LeetCode Solution3933
259License Key Formatting Leetcode Solution3910
260Maximum Subarray Sum using Divide and Conquer3910
261Search Suggestions System LeetCode Solution3907
262Construct Binary Tree from Given Inorder and Preorder Traversals3890
263Next Permutation3884
264Stone Game LeetCode3881
265Sum of Subarray Ranges Leetcode Solution3856
266Prim’s Algorithm3850
267Maximum Sum Increasing Subsequence3848
268Find the Number Occurring Odd Number of Times in an Array3841
269Reverse words in a string3821
270Top K Frequent Words LeetCode Solution3819
271Remove Duplicates from Sorted List LeetCode Solution3794
272Min Stack3789
273Find The Duplicate Number3786
274Contains Duplicate LeetCode Solution3784
275Maximize Distance to Closest Person LeetCode Solution3772
276Reformat Date LeetCode Solution3764
277Special Array With X Elements Greater Than or Equal X Leetcode Solution3738
278Minimum Characters to be Added at Front to Make String Palindrome3737
279Find any one of the multiple repeating elements in read only array3725
280BFS for Disconnected Graph3720
281Maximum Depth of Binary Tree Leetcode Solution3715
282Pairs of Songs With Total Durations Divisible by 60 LeetCode Solution3705
283Most Frequent Element in an Array3698
284Find Words That Can Be Formed by Characters Leetcode Solution3692
285Reverse individual words3689
286Evaluate Division3679
287Find if Path Exists in Graph Leetcode Solution3669
288Diagonal Traverse LeetCode Solution3665
289Minimum Path Sum Leetcode Solution3664
290Implement a stack using single queue3659
291Count of index pairs with equal elements in an array3655
292Design A Leaderboard Leetcode Solution3651
293Sort Elements by Frequency of Occurrences3644
294Arrange given Numbers to Form the Biggest Number II3634
295Best Time to Buy and Sell Stock III Leetcode Solution3633
296Reveal Cards In Increasing Order Leetcode Solution3632
297Intersection of Two Arrays3621
298Remove Nth Node From End of List Leetcode Solution3607
299House Robber3602
300Count Number of Occurrences in a Sorted Array3595
301Last Stone Weight II LeetCode Solution3594
302Single Number3589
303Spiral Matrix II Leetcode Solution3586
304Longest Common Subsequence3577
305Minimum number of Merge Operations to make an Array Palindrome3571
306Length of Longest valid Substring3564
307Diagonal Traversal LeetCode Solution3532
308Invalid Transactions LeetCode Solution3528
309Reverse Bits3514
310N-th Tribonacci Number Leetcode Solution3511
311Symmetric Tree Leetcode Solution3510
312Sudoku Solver3504
313Maximum Size Subarray Sum Equals k Leetcode Solution3499
314Range Sum Query 2D – Immutable Leetcode Solution3497
315Binary Tree Inorder Traversal LeetCode Solution3493
316Special Positions in a Binary Matrix Leetcode Solution3477
317Least Number of Unique Integers after K Removals Leetcode Solution3469
318Find Leaves of Binary Tree LeetCode Solution3458
319Shortest Word Distance Leetcode Solution3447
320Alien Dictionary LeetCode Solution3441
321Brightest Position on Street LeetCode Solution3436
322Find the Closest Palindrome number3429
323Jump Game3405
324Mobile Numeric Keypad Problem3397
325One Edit Distance LeetCode Solution3388
326Partition Labels LeetCode Solution3385
327Binary Tree Zigzag Level Order Traversal LeetCode Solution3383
328Lowest Common Ancestor of a Binary Tree Leetcode Solution3381
329Construct BST from its given Level Order Traversal3379
330Sort Array By Parity II Leetcode Solution3375
331Remove All Ones With Row and Column Flips Leetcode Solution3373
332Find Index of Closing Bracket for a Given Opening Bracket in an Expression3373
333Remove Invalid Parentheses Leetcode Solution3368
334The Celebrity Problem3368
335Find Duplicates in an Array in Most Efficient Way3367
336Partition Array Into Three Parts With Equal Sum Leetcode Solution3364
337Round Robin Scheduling3363
338Check whether Strings are K Distance Apart or Not3358
339Next Greater Element III LeetCode Solution3350
340Find Winner on a Tic Tac Toe Game Leetcode Solution3345
341Robot Bounded In Circle LeetCode Solution3336
342Clone Graph LeetCode Solution3328
343Largest Rectangle in Histogram LeetCode Solution3325
344Rank Transform of an Array Leetcode Solution3315
345Pair of Positive Negative Values in an Array3315
346Next Permutation LeetCode Solution3307
347Invert Binary Tree LeetCode Solution3291
348Reverse Nodes in k-Group LeetCode Solution3285
349Count of Triplets With Sum Less than Given Value3284
350Minimum operation to make all elements equal in array3273
351Paint House LeetCode Solution3264
352Longest subarray not having more than K distinct elements3260
353Minimum Time Visiting All Points Leetcode Solution3256
354Minimum Moves to Equal Array Elements Leetcode Solution3251
355Maximum Circular Subarray Sum3250
356Unique Paths3249
357Range Sum of BST LeetCode Solution3246
358Regular Expression Matching Regular Expression Matching LeetCode Solution3245
359Painting Fence Algorithm3238
360Tug of War3236
361Maximal Square3235
362Minimum Cost to Hire K Workers3235
363Check if a given array contains duplicate elements within k distance from each other3228
364Minimum Depth of Binary Tree Leetcode Solution3223
365String Matching in an Array Leetcode Solution3216
366Merge Two Sorted Linked Lists3212
367Maximum Length of a Concatenated String with Unique Characters Leetcode Solution3207
368Find Top K (or Most Frequent) Numbers in a Stream3196
369Split Linked List in Parts Leetcode Solution3195
370Longest Common Prefix using Trie3195
371Bitwise AND of Numbers Range LeetCode Solution3194
372Find minimum difference between any two elements3193
373Best Time to Buy and Sell Stock with Cooldown Leetcode Solution3190
374Hamming Distance Leetcode Solution3185
375K Empty Slots LeetCode3184
376Smallest Subarray with k Distinct Numbers3181
377Longest subsequence such that difference between adjacents is one3179
378Number of Smaller Elements on Right Side3175
379Find the subarray with least average3172
380Number of Islands II LeetCode Solution3170
381Combination Sum IV LeetCode Solution3170
382Find the First and Second Smallest Elements3164
383Dijkstra Algorithm3161
384Find the Smallest Divisor given a Threshold Leetcode Solution3159
385Sliding Window Technique3158
386Common elements in all rows of a given matrix3157
387Sort a stack using a temporary stack3156
388Minimum Time to Collect All Apples in a Tree LeetCode Solution3150
389Maximum Number of Occurrences of a Substring Leetcode Solution3148
390Design Browser History LeetCode Solution3145
391Non-decreasing Array LeetCode Solution3145
392Transpose Graph3145
393Ugly Number II LeetCode Solution3139
394First Circular Tour to Visit all the Petrol Bunks3139
395LRU Cache Implementation3138
396Minimum Number of Steps to Make Two Strings Anagram Leetcode Solutions3137
397Find Maximum Level sum in Binary Tree3136
398Integer Break LeetCode Solution3134
399Maximum Subarray3123
400Permutation Sequence LeetCode Solution3122
401Longest Substring with At Most K Distinct Characters LeetCode Solution3119
402Minimize Maximum Pair Sum in Array LeetCode Solution3117
403LRU Cache Leetcode Solution3115
404Path With Maximum Minimum Value LeetCode Solution3113
405Missing Element in Sorted Array LeetCode Solution3110
406Unique Paths III LeetCode Solution3104
407Implementation of Deque using circular array3102
408Longest Palindrome can be Formed by Removing or Rearranging Characters3100
409Graph Valid Tree LeetCode Solution3099
410Given an Array of Pairs Find all Symmetric Pairs in it3093
411Queries for counts of array elements with values in given range3089
412Invert Binary Tree LeetCode Solution3085
413Priority Queue using doubly linked list3081
414Convert Sorted Array to Binary Search Tree LeetCode Solutions3069
415Stone Game II Leetcode3058
416Insert Interval Leetcode Solution3056
417Find duplicates in a given array when elements are not limited to a range3056
418Find the Peak Element from an Array3050
419Consecutive Characters LeetCode Solution3048
420Minesweeper LeetCode Solution3044
421Max stack3037
422K Closest Points to Origin Leetcode Solution3034
423Top View of Binary Tree3034
424Word Search3031
425Maximum Consecutive Numbers Present in an Array3030
426Replace Elements with Greatest Element on Right Side Leetcode Solution3017
427Decompress Run-Length Encoded List Leetcode Solution3016
428Restore IP Addresses Leetcode Solution3004
429Toeplitz Matrix3003
430Binary Tree Maximum Path Sum LeetCode Solution3000
431Expression Contains Redundant Bracket or Not2999
432Odd Even Linked List Leetcode Solution2997
433Design a stack that supports getMin() in O(1) time and O(1) extra space2997
434Kth Smallest Element in a BST Leetcode Solution2995
435Stack Permutations (Check if an array is stack permutation of other)2993
436Snakes and Ladders LeetCode Solution2992
437Can Make Arithmetic Progression From Sequence Leetcode Solution2988
438Validate Stack Sequences LeetCode Solution2987
439Sort elements by frequency2985
440Number of Closed Islands Leetcode Solution2981
441Nth Catalan Number2977
442Partition List Leetcode Solution2970
443Move All the Zeros to the End of the Given Array2970
444Priority Queue in C++2960
445Minimum Absolute Difference in BST Leetcode Solution2959
446Sorting array using Stacks2959
447Rearrange array such that even positioned are greater than odd2959
448Search in a Binary Search Tree Leetcode Solution2945
449Longest Common Prefix using Sorting2941
450Sequences of given length where every element is more than or equal to twice of previous2938
451Flood Fill LeetCode2934
452Kruskal Algorithm2930
453Vertical Order Traversal of Binary Tree LeetCode Solution2929
454Search a 2D Matrix II Leetcode Solution2929
455Path Sum II LeetCode Solution2927
456Is Graph Bipartite? LeetCode Solution2926
457Palindrome Substring Queries2918
458Gold Mine Problem2916
459Recursion2915
460Kth Non-repeating Character2914
461Find a Peak Element II LeetCode Solution2913
462Integer to English words2911
463Number Complement Leetcode Solution2908
464Find Minimum in Rotated Sorted Array II LeetCode Solution2905
465Number of Days Between Two Dates LeetCode Solution2896
466Substring with Concatenation of All Words Leetcode Solution2891
467Distance of nearest cell having 1 in a binary matrix2875
468Reverse a linked list2872
469Postfix to Prefix Conversion2870
470How to Implement Stack Using Priority Queue or Heap?2868
471Shortest Completing Word Leetcode Solution2855
472Minimum Path Sum2852
473Check if Two given Strings are Isomorphic to each other2852
474Majority Element2851
475Insert into a Binary Search Tree Leetcode Solution2847
476Count Submatrices With All Ones LeetCode Solution2845
477Convert Sorted Array to Binary Search Tree Leetcode Solution2842
478Best Time to Buy and Sell Stock2842
479Find a Fixed Point in a Given Array2839
480Longest Increasing Path in a Matrix LeetCode Solution2838
481Queries for GCD of all numbers of an array except elements in a given range2837
4824Sum2835
483Cells with Odd Values in a Matrix LeetCode Solution2832
484Multiplication of Two Matrices2831
485Balanced Expression with Replacement2829
486Find All Possible Recipes from Given Supplies LeetCode Solution2828
4873 Sum2828
488Tiling Problem2826
489Intersection of Two Linked Lists LeetCode Solution2817
490Minimum Number of Taps to Open to Water a Garden LeetCode Solution2816
491Find Pythagorean Triplets from Array2814
492Shortest Palindrome2812
493Scramble String LeetCode Solution2810
494Find Median from Data Stream LeetCode Solution2808
495High Five LeetCode Solution2806
496Trapping Rain Water LeetCode Solution2804
497Check If Array Pairs Are Divisible by k LeetCode Solution2802
498Design Hit Counter LeetCode Solution2798
499Rearrange an array in order – smallest, largest, 2nd smallest, 2nd largest2797
500The Stock Span Problem2795
501Largest rectangular sub-matrix whose sum is 02794
502Kth ancestor of a node in binary tree2788
503Reorder Data in Log Files LeetCode Solution2782
504Interval Tree2777
505Custom Sort String Leetcode Solution2776
506Sliding Window Maximum LeetCode Solution2775
507Implement Trie (Prefix Tree) Leetcode Solution2773
508Insert Node in the Sorted Linked List2773
509Camelcase Matching Leetcode Solution2766
510Sieve of Eratosthenes2764
511Merge Two Binary Trees LeetCode Solution2761
512Generate all Binary Strings from Given Pattern2757
513Sliding Window Median Leetcode Solution2752
514Sort Colors2751
515Spiral Matrix III LeetCode Solution2749
516Find the first Repeating Number in a Given Array2744
517Detect a loop in the Linked List2741
518Divide Chocolate LeetCode Solution2733
519Evaluate Reverse Polish Notation LeetCode Solution2733
520Count subarrays having total distinct elements same as original array2733
521Sort an array according to the order defined by another array2721
522Pancake Sorting Problem2720
523Perfect Squares LeetCode Solution2713
524Print all Palindromic Partitions of a String2713
525How to Create Mergable Stack?2705
526Guess Number Higher or Lower II2699
527Letter Case Permutation2699
528Race Car LeetCode Solution2691
529Coin Change Problem2688
530Longest Common Prefix using Divide and Conquer2688
531Analyze User Website Visit Pattern LeetCode Solution2687
532The Maze III LeetCode Solution2687
533Minimum Height Trees2687
534Fibonacci numbers2685
535Check if Array Contains Contiguous Integers With Duplicates Allowed2681
536Maximum Sum of Non Consecutive Elements2679
537Fibonacci Number LeetCode Solution2678
538Minimum Bracket Reversals2676
539Palindrome Permutation LeetCode Solution2675
540LCS (Longest Common Subsequence) of three strings2674
541Best Time to Buy and Sell Stock with Transaction Fee Leetcode Solution2672
542Count Possible Triangles2672
543Merge Overlapping Intervals2668
544Different Ways to Add Parentheses Leetcode Solution2663
545Largest Subarray with Equal Number of 0’s and 1’s2662
546N queen problem2659
547Determine Whether Matrix Can Be Obtained By Rotation LeetCode Solution2653
548Decode String2651
549Subset sum problem2645
550Number of Distinct Islands Leetcode Solution2643
551Longest Substring with At Least K Repeating Characters LeetCode Solution2633
552Path Crossing Leetcode Solution2628
553Longest Repeated Subsequence2626
554Find the Minimum Element in a Sorted and Rotated Array2625
555Maximum Number of Ways to Partition an Array LeetCode Solution2622
556Maximum Length of Chain Pairs2622
557Convert BST to Min Heap2619
558Maximum Element in an Array which is Increasing and then Decreasing2619
559Find maximum length Snake sequence2617
560Find a Sorted Subsequence of size 32614
561Shifting Letters LeetCode Solution2612
562Count items common to both the lists but with different prices2610
563First missing positive2609
564Minimum Jumps to Reach Home LeetCode Solution2603
565Recover Binary Search Tree Leetcode Solution2602
566Group Anagrams2600
567Champagne Tower LeetCode Solution2593
568Build an Array With Stack Operations Leetcode Solution2592
569Iterative Method to find Height of Binary Tree2592
570Edit Distance LeetCode Solution2586
571Queue based approach for first non-repeating character in a stream2582
572Find if an Expression has Duplicate Parenthesis or Not2580
573Decode Ways2574
574Implement Two Stacks in an Array2571
575Minimum Height Trees LeetCode Solution2570
576Make Two Arrays Equal by Reversing Sub-arrays Leetcode Solution2570
577Find the two Numbers with Odd Occurrences in an Unsorted Array2568
578Find the Lost Element From a Duplicated Array2562
579Jump Game IV LeetCode Solution2561
580K-th Distinct Element in an Array2560
581Contiguous Array LeetCode Solution2559
582Number of Equivalent Domino Pairs Leetcode Solution2557
583Nearest Exit from Entrance in Maze LeetCode Solution2555
584Sort a stack using recursion2554
585Palindrome Partitioning Leetcode Solution2553
586Contains Duplicate2552
587Sliding Window Maximum2541
588Valid Boomerang Leetcode Solution2540
589Most Stones Removed with Same Row or Column LeetCode Solution2538
590Rectangle Overlap LeetCode Solution2537
591Subarrays with K Different Integers Leetcode Solution2519
592Distance Between Bus Stops Leetcode Solution2517
593Word Break2510
594Sorted Linked List to Balanced BST2505
595Design a Stack With Increment Operation Leetcode Solution2504
596Monotonic Array Leetcode Solution2497
597Number of Subsequences That Satisfy the Given Sum Condition LeetCode solution2494
598Reorder an Array According to the Given Indexes2493
599Morris Traversal2490
600Recover Binary Search Tree2489
601Palindromic Substrings Leetcode Solution2487
602Find the Town Judge LeetCode Solution2480
603Minimum number of jumps to reach end2479
604Palindrome Permutations of a String2474
605Rearrange Spaces Between Words Leetcode Solution2471
606Sort a String According to Another String2471
607Construction of Longest Increasing Subsequence (N log N)2470
608Find Largest Value in Each Tree Row LeetCode Solution2468
609Merge Overlapping Intervals II2463
610Maximum Score After Splitting a String Leetcode Solution2462
611Possible Bipartition LeetCode Solution2458
612Queue using Stacks2458
613Best Meeting Point LeetCode Solution2450
614Reach a Number LeetCode Solution2443
615Number of palindromic paths in a matrix2441
616Implement strStr() LeetCode Solution2439
617Maximum Depth of N-ary Tree Leetcode Solution2438
618Smallest Good Base2437
619Merge Two Balanced Binary Search Trees2437
620Maximum sum rectangle in a 2D matrix2433
621Maximum Frequency Stack Leetcode Solution2427
622Check if the given array can represent Level Order Traversal of Binary Search Tree2427
623Valid Parentheses Leetcode Solution2426
624All Possible Full Binary Trees LeetCode Solution2416
625Detect Capital Leetcode Solution2416
626Maximize Elements Using Another Array2410
627Find the Subarray of given length with Least Average2410
628Binary Tree zigzag level order Traversal2403
629Find Median from data Stream2402
630Best Time to Buy and Sell Stock IV LeetCode Solution2397
631Mean of Array After Removing Some Elements Leetcode Solution2397
632Perform String Shifts Leetcode2394
633Swapping Nodes in a Linked List Leetcode Solution2389
634Find the First Circular Tour that visits all the Petrol Pumps2387
635Maximum Product of Splitted Binary Tree LeetCode Solution2386
636Brick Wall LeetCode Solution2381
637Lowest Common Ancestor of a Binary Search Tree Leetcode Solution2375
638A Space Optimized DP solution for 0-1 Knapsack Problem2374
639Caesar Cipher2374
640Pair with given product2372
641Valid Sudoku2370
642Find all pairs (a, b) in an array such that a % b = k2366
643Design Skiplist LeetCode Solution2365
644Merge K Sorted Arrays and Print Sorted Output2364
645Word Pattern2354
646Palindrome Permutation2348
647Convert Sorted List to Binary Search Tree2346
648Find First and Last Position of Element in Sorted Array LeetCode Solution2343
649My Calendar I LeetCode Solution2342
650Binary Tree Right Side View LeetCode Solution2336
651Populating Next Right Pointers in Each Node Leetcode Solution2331
652Huffman Coding2329
653Count pair with Given Sum2326
654Split Array Into Consecutive Subsequences2309
655Group Multiple Occurrence of Array Elements Ordered by first Occurrence2305
656How to Efficiently Implement k Stacks in a Single Array?2303
657Check for Balanced Parentheses in an Expression2302
658Construct BST from given Preorder Traversal2298
659Maximum Number of Chocolates to be Distributed Equally Among k Students2294
660Add two numbers2293
661Check if a Linked list of Strings form a Palindrome2292
662Find Zeros to be Flipped so that Number of Consecutive 1’s is Maximized2289
663All Unique Triplets that Sum up to a Given Value2288
664Segregate 0s and 1s in an Array2288
665Level order Traversal in Spiral Form2284
666Web Crawler LeetCode Solution2282
667Count ways to reach the nth stair using step 1, 2 or 32276
668Length of Longest Fibonacci Subsequence2274
669Partition to K Equal Sum Subsets Leetcode Solution2273
670Minimum time required to rot all oranges2271
671Print Fibonacci sequence using 2 variables2270
672Largest Sum Contiguous Subarray2270
673Count Sub Islands LeetCode Solution2268
674Arithmetic Slices II – Subsequence LeetCode Solution2264
675Remove brackets from an algebraic string containing + and – operators2264
676Minimum Sum Path in a Triangle2262
677Find whether a subarray is in form of a mountain or not2257
678Populating Next Right Pointers in Each Node2253
679Counting Bits2250
680Shortest Path in a Grid with Obstacles Elimination LeetCode Solution2249
681Find all triplets with zero sum2248
682Isomorphic Strings LeetCode Solution2243
683Minimum Swaps to Group All 1’s Together Leetcode Solution2243
684Longest Subarray Having Count of 1s One More than Count of 0s2242
685Find four elements that sum to a given value (Hashmap)2242
686Print all subarrays with 0 sum2234
687Check if String Follows Order of Characters by a Pattern or not2232
688Sort 0s 1s and 2s in an Array2230
689Validate Binary Search Tree2227
690Concatenation of Array LeetCode Solution2224
691Count Distinct Elements in Every Window of Size K2215
692Remove Palindromic Subsequences Leetcode Solution2209
693Partition Problem2205
694Rearrange Array such that arr[i] >= arr[j] if i is even and arr[i] <= arr[j] if i is odd and j < i2203
695Swap Kth Node from beginning with Kth Node from End2201
696Heap Sort2200
697Elements Appear more than N/K times in Array2198
698Bubble sort using two Stacks2196
699Binary Tree to Binary Search Tree Conversion2182
700Range Sum Query 2D – Immutable LeetCode Solution2181
701Maximize Sum of Array after K Negations Leetcode Solution2176
702Finding K closest element2174
703Happy Number2173
704Count Minimum Steps to Get the given Array2158
705Count Good Nodes in Binary Tree LeetCode Solution2155
706Find Maximum of Minimum for Every Window Size in a Given Array2152
707Difference Array | Range update query in O(1)2143
708Rearrange an Array Such that arr[i] is equal to i2140
709String comparison containing wildcards2138
710Find All Pairs With a Given Difference2137
711Maximum Product Subarray II2135
712Nested List Weight Sum II LeetCode Solution2132
713Maximum Distance in Array2125
714Contiguous Array Leetcode2125
715Rotate Array2124
716Inorder Successor of a node in Binary Tree2122
717Increasing Subsequence of Length three with Maximum Product2122
718Linked List Cycle2121
719Find Duplicate Subtrees2121
720Container with Most Water2119
721An Interesting Method to generate Binary Numbers from 1 to n2118
722MiniMax Algorithm2116
723Sum Root to Leaf Numbers LeetCode Solution2112
724Reverse Nodes in K-Group2106
725Queries on Probability of Even or Odd Number in given Ranges2101
726Find pairs with given sum such that elements of pair are in different rows2099
727Symmetric Tree2099
728Merge Two Sorted Lists Leetcode2099
729Reorder Array Using Given Indexes2099
730Score of Parenthesis LeetCode Solution2084
731Queue Reconstruction by Height2084
732Longest Common Prefix Using Binary Search II2084
733Longest Increasing Subsequence2080
734Minimum Swaps to Make Strings Equal Leetcode Solution2079
735Iterative Depth First Traversal of Graph2074
736Climbing stairs2074
737Minimum Cost to Move Chips to The Same Position LeetCode Solution2071
738Breadth First Search (BFS) for a Graph2067
739Parallel Courses II LeetCode Solution2066
740Check if Two Expressions With Brackets are Same2063
741Merge K Sorted Linked Lists2061
742Alien Dictionary2060
743Iterative Preorder Traversal2056
744Substring With Concatenation Of All Words2055
745Remove duplicates from sorted array2051
746Root to Leaf path with target sum Leetcode Solutions2048
747Construct Binary Tree from Preorder and Postorder Traversal LeetCode Solution2042
748Union and Intersection of two Linked Lists2041
749Minimum Distance Between BST Nodes Leetcode Solution2040
750Deletion in a Binary Tree2039
751K maximum sums of overlapping contiguous sub-arrays2031
752Merging Intervals2031
753Kill Process LeetCode Solution2030
754Delete Nth node from the end of the given linked list2030
755Longest Common Prefix Word by Word Matching2030
756Smallest Range II Leetcode Solution2029
757Check if a queue can be sorted into another queue using a stack2023
758Print a Binary Tree in Vertical Order2023
759Check if any two intervals overlap among a given set of intervals2020
760Flatten 2D Vector LeetCode Solution2017
761Delete Nodes and Return Forest Leetcode Solution2015
762Minimum Number of Arrows to Burst Balloons LeetCode Solution2014
763Find subarray with given sum (Handles Negative Numbers)2014
764Maximum difference between two elements such as larger element comes after smaller2013
765Maximum size subarray sum equals k2010
766Range LCM Queries2009
767Find the first repeating element in an array of integers1998
768New 21 Game1997
769Non-overlapping sum of two sets1987
770Find K Closest Elements LeetCode Solution1986
771Minimum Size Subarray Sum1986
772Maximum Product Subarray1982
773Partition Equal Subset Sum1979
774Filter Restaurants by Vegan-Friendly, Price and Distance Leetcode Solution1977
775Find the Difference Leetcode Solution1973
776Vertical sum in a given binary tree1968
777Friends Of Appropriate Ages LeetCode Solution1956
778Construct Binary Tree from given Parent Array representation1956
779Find Maximum Sum Possible Equal Sum of Three Stacks1948
780Sorting a K Sorted Array1948
781Verify Preorder Serialization of a Binary Tree1945
782Matrix Chain Multiplication1943
783Reservoir Sampling1941
784Defanging an IP Address LeetCode Solution1938
785Valid Parenthesis String1938
786Sort Array by Increasing Frequency Leetcode Solution1936
787Check if a given array can represent Preorder Traversal of Binary Search Tree1935
788Peak Index in a Mountain Array LeetCode Solution1934
789Boundary Traversal of binary tree1934
790The Painter’s Partition Problem1934
791Minimum Remove to Make Valid Parentheses LeetCode Solution1931
792Boolean Parenthesization Problem1930
793Flatten Binary Tree to Linked List LeetCode Solution1920
794Find K Length Subarray of Maximum Average1918
795Find Three Element From Different Three Arrays Such That a + b + c = sum1915
796Pancake Sorting1913
797Valid Anagrams1912
798Find Sum of all unique sub-array sum for a given array1910
799Count pairs from two linked lists whose sum is equal to a given value1903
800Number of siblings of a given Node in n-ary Tree1895
801Check Completeness of a Binary Tree LeetCode Solution1893
802Given a binary tree, how do you remove all the half nodes?1890
803Sum of f(a[i], a[j]) over all pairs in an array of n integers1880
804Level order traversal using two Queues1878
805Remove Duplicates from Sorted List II1876
806Isomorphic Strings1876
807Count number of triplets with product equal to given number1870
808Hamming Distance1870
809Super Ugly Number1869
810Longest Palindromic Subsequence1868
811Employee Importance LeetCode Solution1865
812Palindrome Partitioning1865
813Largest Submatrix With Rearrangements LeetCode Solution1864
814Count and Say1864
815Tree Traversal (Preorder, Inorder & Postorder)1864
816Third Maximum Number Leetcode Solution1858
817Print All Distinct Elements of a Given Integer Array1857
818BFS vs DFS for Binary Tree1855
819Find Element Using Binary Search in Sorted Array1852
820Kth Smallest Element in a Sorted Matrix LeetCode Solution1851
821Median of Two Sorted Arrays1850
822Unique Binary Search Trees1850
823Lowest Common Ancestor1849
824Create Maximum Number1849
825Find the largest multiple of 31848
826Level of Each node in a Tree from source node1845
827Valid Triangle Number LeetCode Solution1844
828Closest Leaf in a Binary Tree LeetCode Solution1842
829Largest BST Subtree LeetCode Solution1839
830Largest divisible pairs subset1839
831Products of ranges in an array1839
832Unique Binary Search Trees LeetCode Solution1838
833Array Nesting Leetcode Solution1837
834Print all triplets in sorted array that form AP1836
835Find Common Characters Leetcode Solution1835
836Find Peak Element1831
837Check if all levels of two Binary Tree are anagrams or not1830
838Infix to Postfix1830
839Minimum insertions to form a palindrome with permutations allowed1826
840Number Of Longest Increasing Subsequence1826
841Find distance between two nodes of a Binary Tree1823
842Maximum subsequence sum such that no three are consecutive1822
843Bold Words in String LeetCode Solution1821
844Subset Sum Problem in O(sum) space1820
845Distinct Subsequences1809
846Valid Number1808
847Balanced Binary Tree1807
848Binary array after M range toggle operations1804
849Four Elements that Sum to Given1802
850Check if two nodes are on the same path in a Tree1794
851Find Nth Node1794
852Merging Two Sorted Arrays1793
853Compare Strings by Frequency of the Smallest Character Leetcode Solution1790
854Topological Sorting1789
855Newman-Conway Sequence1788
856Maximum number of segments of lengths a, b and c1787
857Find Smallest Range Containing Elements from k Lists1784
858Arrange given numbers to form the biggest number1783
859Maximum Population Year LeetCode Solution1780
860Transform a BST to Greater sum Tree1777
861Next Greater Element in an Array1776
862Shuffle an Array1772
863Sort Elements by Frequency II1770
864Insert Delete GetRandom1767
865Sentence Screen Fitting LeetCode Solution1766
866Missing Number1762
867Path Sum1758
868Maximum Sum of 3 Non-Overlapping Subarrays1751
869Stone Game IV LeetCode Solution1749
870Trapping Rain Water II LeetCode Solution1749
871Stone Game IV LeetCode Solution1747
872Binary Tree Longest Consecutive Sequence LeetCode Solution1747
873Lower Case To Upper Case1747
874Contiguous Array1745
875First Bad Version1740
876Averages of Levels in Binary Tree1738
877Encoded String With Shortest Length LeetCode Solution1735
878Kth Smallest Number in Multiplication Table Leetcode Solution1735
879Minimum sum of squares of character counts in a given string after removing k characters1733
880Largest subarray with equal number of 0s and 1s1729
881Height of a generic tree from parent array1727
882Minimum Swaps To Make Sequences Increasing LeetCode Solution1725
883Maximum Side Length of a Square with Sum Less than or Equal to Threshold LeetCode Solution1724
884Find Largest d in Array such that a + b + c = d1724
885Count Primes in Ranges1720
886Serialize and Deserialize Binary Tree LeetCode Solution1719
887Integer to Roman1717
888Merge Two Sorted Arrays1717
889Print Right View of a Binary Tree1716
890Valid Triangle Number LeetCode Solution1715
891Bottom View of a Binary Tree1715
892Red-Black Tree Introduction1707
893Closest Binary Search Tree Value Leetcode Solution1706
894Next Greater Element II LeetCode Solution1704
895Range Minimum Query (Square Root Decomposition and Sparse Table)1704
896Permutations of a Given String Using STL1701
897Valid Perfect Square LeetCode Solution1689
898Binary Search Tree Delete Operation1689
899Reorganize String1684
900Rearrange an array such that ‘arr[j]’ becomes ‘i’ if ‘arr[i]’ is ‘j’1683
901Find unique character in a string1682
902Diameter of N-Ary Tree LeetCode Solution1680
903Iterative Postorder Traversal Using Two Stacks1679
904Longest Bitonic Subsequence1678
905Segment Tree1677
906Friends Pairing Problem1675
907Diagonal Traversal of Binary Tree1669
908Level Order Traversal of Binary Tree1660
909Maximum difference between frequency of two elements such that element having greater frequency is also greater1657
910Find Minimum In Rotated Sorted Array1655
911Koko Eating Bananas LeetCode Solution1653
912Constant time range add operation on an array1651
913Next greater element1648
914Valid Tic-Tac-Toe State LeetCode Solution1647
915Orderly Queue LeetCode Solution1642
916Range Sum Query using Sparse Table1641
917Step-By-Step Directions From a Binary Tree Node to Another LeetCode Solution1639
918Swap Nodes In Pairs1639
919Serialize and Deserialize Binary Tree1638
920Reverse a Path in BST using Queue1637
921Total Hamming Distance LeetCode Solution1634
922Maximum difference between first and last indexes of an element in array1631
923Largest Plus Sign Leetcode Solution1629
924Best Meeting Point LeetCode Solution1627
925Find minimum number of merge operations to make an array palindrome1618
926Maximum Product Subarray1618
927Advantages of BST over Hash Table1611
928Maximum Product Subarray1606
929Convert BST into a Min-Heap without using array1601
930Find the smallest binary digit multiple of given number1598
931The Number of Weak Characters in the Game LeetCode Solution1592
932Count the Pairs at Same Distance as in English Alphabets1588
933Longest Increasing Consecutive Subsequence1579
934Array Queries for multiply replacements and product1578
935Print n terms of Newman-Conway Sequence1576
936A program to check if a binary tree is BST or not1575
937Collect maximum points in a grid using two traversals1574
938Find the node with minimum value in a Binary Search Tree1568
939Greatest Sum Divisible by Three LeetCode Solution1567
940Edit Distance1567
941Group Shifted Strings Leetcode Solution1565
942Dividing Array into Pairs With Sum Divisible by K1565
943Design Add and Search Words Data Structure LeetCode Solution1564
944Longest Substring Without Repeating Characters Leetcode Solution1564
945Shuffle a given Array1564
946K’th Largest element in BST using constant extra space1554
947Maximum Sum Increasing Subsequence1553
948Image Overlap LeetCode Solution1552
949Design Underground System Leetcode Solution1548
950Factorial Trailing Zeroes LeetCode Solution1543
951Write Code to Determine if Two Trees are Identical1543
952Check if an Array is Stack Sortable1543
953Write a function to get the intersection point of two Linked Lists1542
954Print Next Greater Number of Q queries1542
955Merge Sort1538
956Range Queries for Longest Correct Bracket Subsequence1535
957Binary Search Tree Search and Insertion1534
958Insert into a Sorted Circular Linked List LeetCode Solution1527
959Queries on XOR of greatest odd divisor of the range1527
960Lowest Common Ancestor in Binary Search Tree1525
961Clone a Binary Tree with Random Pointers1518
962Moving Stones Until Consecutive Leetcode Solution1516
963Print modified array after multiple array range increment operations1513
964Swim in Rising Water LeetCode Solution1506
965Priority Queue1506
966Form Minimum Number From Given Sequence1504
967Numbers with prime frequencies greater than or equal to k1502
968Form minimum number from given sequence1499
969Power of Two1498
970Guess The Word1495
971Maximum Array from Two given Arrays Keeping Order Same1492
972K’th Largest Element in BST when modification to BST is not allowed1491
973Count even length binary sequences with same sum of first and second half bits1477
974Construct Complete Binary Tree from its Linked List Representation1474
975Closest Binary Search Tree Value II LeetCode Solution1473
976Cutting a Rod1471
977K Empty Slots1466
978Excel Sheet Column Number LeetCode Solution1465
979Print all Possible Ways to Break a String in Bracket Form1464
980Merge Sorted Array1455
981Check if X can give change to every person in the Queue1454
982Check for Palindrome after every character replacement Query1449
983Longest Common Prefix using Character by Character Matching1448
984Check if each internal node of a BST has exactly one child1445
985Sorted Array to Balanced BST1445
986Find maximum average subarray of k length1443
987Queries for Number of Distinct Elements in a Subarray1442
988Find postorder traversal of BST from preorder traversal1437
989Queries for Decimal Values of Subarrays of a Binary Array1436
990Number of elements less than or equal to a given number in a given subarray1435
991Minimum Possible Integer After at Most K Adjacent Swaps On Digits LeetCode Solution1434
992Kth Smallest Element in a BST1433
993Count and Toggle Queries on a Binary Array1429
994Minimum Moves to Equal Array Elements LeetCode Solution1425
995Count Pairs Whose Products Exist in Array1425
996Search in Sorted Rotated Array1425
997Binary Search Tree1418
998Insert Delete GetRandom O(1) – Duplicates allowed LeetCode Solution1417
999Print Ancestors of a Given Binary Tree Node Without Recursion1414
1000Merge two BSTs with limited extra space1405
1001Unique Paths II1403
1002Number of Orders in the Backlog Leetcode Solution1401
1003Sum of Left Leaves LeetCode Solution1400
1004Decrease Elements To Make Array Zigzag LeetCode Solution1395
1005How to print maximum number of A’s using given four keys1392
1006Find Maximum Depth of Nested Parenthesis in a String1382
1007Regular Expression Matching1380
1008Palindrome Partitioning1375
1009Shortest Unsorted Continuous Subarray LeetCode Solution1373
1010Graph Cloning1369
1011Symmetric Tree LeetCode Solution Leetcode Solution1368
1012Kth Smallest Product of Two Sorted Arrays LeetCode Solution1363
1013Excel Sheet Column Title LeetCode Solution1362
1014Check given array of size n can represent BST of n levels or not1359
1015Random Pick Index LeetCode Solution1353
1016Maximum weight transformation of a given string1353
1017Data Structure Designing1345
1018Convert a BST to a Binary Tree such that sum of all greater keys is added to every key1326
1019Maximum Depth Of Binary Tree1322
1020Minimum Number of Operations to Move All Balls to Each Box LeetCode Solution1314
1021Search an Element in Sorted Rotated Array1305
1022Iterative method to find ancestors of a given binary tree1297
1023Find the Town Judge LeetCode Solution1245
1024Binary Tree to Binary Search Tree Conversion using STL set1235
1025Next Greater Element I Leetcode Solution1229
1026Maximum Binary Tree1219
1027Print Maximum Length Chain of Pairs1190
1028Find k-th smallest element in BST (Order Statistics in BST)1189
1029Peeking Iterator LeetCode Solution1175
1030Find Two Non-overlapping Sub-arrays Each With Target Sum LeetCode Solution1167
1031Flatten Binary Tree to Linked List LeetCode Solution1140
Translate »