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 Solution27751
2Maximum occurring character in a string15843
3Plus One Leetcode Solution13857
4Valid Parentheses LeetCode Solution13134
5First Repeating Element11427
63Sum Leetcode Solution11302
7Single Number Leetcode Solution10834
8Pow(x, n) Leetcode Solution9506
9Sqrt(x) Leetcode Solution8974
10Merge Sorted Arrays Leetcode Solution8902
11Meeting Rooms II LeetCode Solution8846
12Contains Duplicate II Leetcode Solution8614
13Search Insert Position Leetcode Solution8098
14Count Primes Leetcode Solutions8020
15Roman to Integer Leetcode Solution7913
16Concatenation of Array LeetCode Solution7800
17Valid Palindrome Leetcode Solution7770
18Reverse Vowels of a String Leetcode Solution7707
19Intersection of Two Arrays II Leetcode Solution7671
20Palindrome Number LeetCode Solution7590
21Find the Maximum Repeating Number in Array7580
22Jump Game Leetcode Solution7167
23Text Justification LeetCode Solution7143
24Kids With the Greatest Number of Candies Leetcode Solution7066
25Number of Good Pairs Leetcode Solution6983
26Add Binary Leetcode Solution6949
27House Robber Leetcode Solution6930
28Spiral Matrix LeetCode Solution6873
29Number Of 1 bits6609
30Find All Numbers Disappeared in an Array Leetcode Solution6574
31Longest Palindromic Substring LeetCode Solution6543
32Running Sum of 1d Array Leetcode Solution6480
33Kth Missing Positive Number Leetcode Solution6451
34Shuffle String Leetcode Solution6415
35Find Minimum Distance Between Two Numbers in an Array6285
36Permutations Leetcode Solution6273
37Power of Two Leetcode Solution6273
38Next Permutation Leetcode Solution6214
39Maximum Profit in Job Scheduling Leetcode Solution6181
40Longest Common Prefix Leetcode Solution6171
41Jewels and Stones Leetcode Solution6158
42Maximum Subarray Leetcode Solution6133
43Word Search Leetcode Solution6030
44Frog Jump Leetcode Solution6020
45Third Maximum Number Leetcode Solution6008
46Longest Substring Without Repeating Characters LeetCode Solution5997
47Reverse String Without Temporary Variable5974
48Number of Islands LeetCode Solution5893
49Bulb Switcher LeetCode Solution5853
50Daily Temperatures Leetcode Solution5852
51Combination Sum Leetcode Solution5828
52Move Zeroes LeetCode Solution5818
53Next Greater Element I Leetcode Solution5766
54Rotate Image LeetCode Solution5743
55Min Stack Leetcode Solution5732
56Strobogrammatic Number LeetCode Solution5705
573Sum Closest LeetCode Solution5681
58Shuffle the Array Leetcode Solution5628
59Can Place Flowers LeetCode Solution5625
60Subarray and Subsequence5595
61Missing Number Leetcode Solution5566
62Search in Rotated Sorted Array Leetcode Solution5561
63Multiply Strings Leetcode Solution5554
64Count Pairs With Given Sum5455
65Excel Sheet Column Title Leetcode Solution5421
66Integer to Roman Leetcode Solution5353
67House Robber II Leetcode Solution5339
68Count and Say Leetcode Solution5337
69Product of array except self5294
70Median of Two Sorted Arrays LeetCode Solution5279
71Koko Eating Bananas Leetcode Solution5233
72Isomorphic Strings Leetcode Solution5217
73Largest Number Leetcode Solution5185
74String to Integer (atoi) LeetCode Solution5184
75Remove Duplicates from Sorted Array Leetcode Solution5184
76Find the Difference Leetcode Solution5084
77Set Matrix Zeroes4983
78Smallest window in a string containing all characters of another string4944
79Balanced Binary Tree Leetcode Solution4933
80How Many Numbers Are Smaller Than the Current Number Leetcode Solution4912
81Find Common Characters Leetcode Solution4891
82Valid Anagram Leetcode Solution4888
83Summary Ranges Leetcode Solution4822
84Happy Number Leetcode Solution4796
85Candy LeetCode Solution4740
86Subtract the Product and Sum of Digits of an Integer Leetcode Solution4739
87Majority Element Leetcode Solution4730
88Evaluation of Postfix Expression4726
89Rearrange Positive and Negative Numbers Alternatively in Array4716
90Linked List Cycle II LeetCode Solution4712
91Is Subsequence Leetcode Solution4703
92Unique Paths Leetcode Solution4687
93Arranging Coins Leetcode Solution4681
94Subset Leetcode4519
95Word Pattern LeetCode Solution4497
96Repeated Substring Pattern LeetCode Solution4481
97Sort Colors LeetCode Solution4475
98Zigzag Conversion LeetCode Solution4446
99Rotate String LeetCode Solution4433
100Reverse Integer Leetcode Solution4404
101Sum of minimum and maximum elements of all subarrays of size k4400
102Sort Array By Parity LeetCode Solution4396
103Find the Winner of the Circular Game LeetCode Solution4347
104String Compression LeetCode Solution4333
105Valid Palindrome II Leetcode Solution4316
106Bus Routes Leetcode Solution4314
107Asteroid Collision LeetCode Solution4313
108Find the Town Judge Leetcode Solution4299
109Find the Duplicate Number LeetCode Solution4272
110Sort Characters By Frequency LeetCode Solution4254
111Pascal Triangle Leetcode4230
112Best Time to Buy and Sell Stock  II Leetcode Solution4225
113Merge Two Sorted Lists Leetcode Solutions4218
114Product of Array Except Self LeetCode Solution4203
115Employee Free Time LeetCode Solution4194
116First element occurring k times in an array4182
117Fibonacci Number LeetCode Solution4160
118Minimum Cost For Tickets Leetcode Solution4135
119A Product Array Puzzle4124
120Build Array From Permutation Leetcode Solution4123
121Divide Two Integers Leetcode Solution4106
122Binary Search LeetCode Solution4088
123Subarray with Given Sum4068
124Implementation of Deque using Doubly Linked List4052
125Kth largest element in an Array Leetcode Solutions4051
126Expression Evaluation4037
127Number of Provinces Leetcode Solution4031
128Best Time to Buy and Sell Stock LeetCode Solution4031
129Minimum Steps to reach target by a Knight4020
130Find Smallest Missing Number in a Sorted Array4020
131Increasing Triplet Subsequence LeetCode Solution3992
132Decode String Leetcode Solution3989
133Optimal Account Balancing LeetCode Solution3988
134Rabin Karp Algorithm3972
135Length of Last Word Leetcode Solution3961
136Postfix to Infix Conversion3942
137Check if the Elements of an Array are Consecutive3909
138H-Index Leetcode Solution3905
139First Unique Character in a String LeetCode Solution3900
140Find the Missing Number3894
141Matrix Chain Multiplication using Dynamic Programming3874
142Robot Room Cleaner Leetcode Solution3855
143Defanging an IP Address Leetcode Solution3839
144Subarray Product Less Than K LeetCode Solution3794
145Convert array into Zig-Zag fashion3786
146Page Replacement Algorithms in Operating Systems3785
147K-th Smallest Element in a Sorted Matrix3784
148Pascal’s Triangle II Leetcode Solution3767
149Bellman Ford Algorithm3766
150Form Minimum Number from Given Sequence of D’s and I’s3756
151Find First and Last Position of Element in Sorted Array Leetcode Solution3723
152Coin Change 2 Leetcode Solution3720
153Remove Linked List Elements Leetcode Solution3717
154Length of the largest subarray with contiguous elements3705
155Swap Nodes in Pairs Leetcode Solutions3690
156Backspace String Compare3683
157Reverse Words in a String III LeetCode Solution3680
158Capacity To Ship Packages Within D Days Leetcode Solution3679
159Prefix to Infix Conversion3675
160Lemonade Change Leetcode Solution3673
161Group Anagrams LeetCode Solution3670
162Guess Number Higher or Lower LeetCode Solution3634
163Design Parking System Leetcode Solution3622
164OSI Model3622
165Combinations Leetcode Solution3616
166Island Perimeter Leetcode Solution3612
167Iterative Implementation of Quick Sort3612
168Add Two Numbers II Leetcode Solution3596
169Majority Element II Leetcode Solution3576
170First negative integer in every window of size k3558
171Find Pair with Given Difference3557
172Assign Cookies Leetcode Solution3553
173Palindrome Linked List Leetcode Solution3540
174Remove All Occurrences of a Substring LeetCode Solution3533
175Repeated Substring Pattern3533
176Trapping Rain Water Leetcode Solution3520
177KMP Algorithm3499
178Max Consecutive Ones Leetcode Solution3489
179Last Stone Weight3472
180String Compression3463
181Remove Duplicates from Sorted Array II Leetcode Solution3459
182Remove Duplicates from Sorted List II LeetCode Solution3457
183Delete middle element of a stack3455
184Break a Palindrome LeetCode Solution3437
185Rearrange given Array in Maximum Minimum Form3428
186Find All Duplicates in an Array LeetCode Solution3387
187Generate Parentheses Leetcode Solution3374
188Same Tree LeetCode Solution3365
189Continuous Subarray Sum LeetCode Solution3363
190Convert a Number to Hexadecimal Leetcode Solution3350
191Monotonic Array LeetCode Solution3342
192Find N Unique Integers Sum up to Zero Leetcode Solution3339
193Find Leaders in an Array3323
194Delete Node in a Linked List Leetcode Solution3319
195The K Weakest Rows in a Matrix Leetcode Solution3318
19601 Matrix LeetCode Solution3312
197Moving Average from Data Stream Leetcode Solution3311
198Word Ladder LeetCode Solution3304
199Printing brackets in Matrix Chain Multiplication Problem3263
200Find Triplet in Array With a Given Sum3252
201Second Most Repeated Word in a Sequence3236
202Palindrome Number3234
203Smallest Positive Number Missing in an Unsorted Array3231
204Find Peak Element LeetCode Solution3215
205Target Sum3215
206Time Based Key-Value Store LeetCode Solution3201
207Subarray Sum Equals k3198
208Number of Steps to Reduce a Number to Zero Leetcode Solution3196
209Valid Perfect Square Leetcode Solution3168
210Combination Sum3154
211Slowest Key Leetcode Solution3150
212Find the Duplicate Element3145
213Reverse Only Letters LeetCode Solution3143
214Generate all Binary Strings Without Consecutive 1’s3138
215Rotate List Leetcode Solution3136
216Permutation in String Leetcode Solution3126
217Insert Delete GetRandom O(1) Leetcode Solution3120
218Leetcode Permutations3120
219Minimum Operations to convert X to Y3115
220Max Area of Island3115
221Check If Two String Arrays are Equivalent Leetcode Solution3112
222Minimum Knight Moves LeetCode Solution3104
223Merge k Sorted Lists Leetcode Solution3102
224Sum of Subarray Ranges Leetcode Solution3100
225Kth Largest Element in a Stream Leetcode Solution3084
226Unique Paths II Leetcode Solution3080
227Cuckoo sequence program3080
228Find the Row with Maximum Number of 1’s3080
229Top K Frequent Elements LeetCode Solution3078
230Maximum Product of Three Numbers LeetCode Solution3076
231Letter Combinations of a Phone Number3076
232Number of Dice Rolls With Target Sum LeetCode Solution3058
233Make The String Great Leetcode Solution3058
234Relative Sort Array Leetcode Solution3042
235Stock Buy Sell to Maximize Profit3035
236Minimum swaps required to bring all elements less than or equal to k together3026
237Subarray Sum Equals K LeetCode Solution3024
238LRU Cache LeetCode Solution3024
239Remove Minimum Characters so that Two Strings Become Anagrams3024
240Check If N and Its Double Exist Leetcode Solution3000
241Merge Sorted Array LeetCode Solution2997
242Count Good Nodes in Binary Tree Leetcode Solution2995
243Scramble String2989
244Maximize Distance to Closest Person LeetCode Solution2981
245Maximum Population Year LeetCode Solution2980
246Prefix to Postfix Conversion2975
247Longest Common Subsequence LeetCode Solution2973
248Arrange given Numbers to Form the Biggest Number II2965
249Find the Number Occurring Odd Number of Times in an Array2956
250Single Element in a Sorted Array LeetCode Solution2954
251Maximum Subarray Sum using Divide and Conquer2944
252Top K Frequent Elements2941
253Remove Duplicates from Sorted List LeetCode Solution2937
254Minimum Characters to be Added at Front to Make String Palindrome2930
255Relative Ranks Leetcode Solution2923
256Most Frequent Element in an Array2915
257Top K Frequent Words LeetCode Solution2914
258Sort Elements by Frequency of Occurrences2912
259License Key Formatting Leetcode Solution2901
260Given two unsorted arrays find all pairs whose sum is x2886
261Min Cost Climbing Stairs LeetCode Solution2881
262Maximum Sum Increasing Subsequence2876
263N-Queens LeetCode Solution2869
264Reverse individual words2867
265The kth Factor of n Leetcode Solution2855
266Search Suggestions System LeetCode Solution2852
267Flipping an Image LeetCode Solution2851
268Minimum Path Sum Leetcode Solution2842
269Intersection of Two Arrays2841
270Find any one of the multiple repeating elements in read only array2817
271Next Permutation2800
272Student Attendance Record I Leetcode Solution2794
273Count of index pairs with equal elements in an array2785
274To Lower Case Leetcode Solution2751
275Design A Leaderboard Leetcode Solution2747
276Spiral Matrix II Leetcode Solution2745
277Maximum Depth of Binary Tree Leetcode Solution2739
278Find if Path Exists in Graph Leetcode Solution2737
279Implement a stack using single queue2732
280Diagonal Traversal LeetCode Solution2723
281Check whether Strings are K Distance Apart or Not2711
282Arithmetic Expression Evaluation2704
283Reformat Date LeetCode Solution2698
284Length of Longest valid Substring2696
285Diagonal Traverse LeetCode Solution2692
286Pairs of Songs With Total Durations Divisible by 60 LeetCode Solution2683
287Count Number of Occurrences in a Sorted Array2680
288Evaluate Division2679
289Robot Bounded In Circle LeetCode Solution2677
290Maximum Size Subarray Sum Equals k Leetcode Solution2669
291BFS for Disconnected Graph2664
292Minimum number of Merge Operations to make an Array Palindrome2659
293Best Time to Buy and Sell Stock III Leetcode Solution2656
294Prim’s Algorithm2648
295Brightest Position on Street LeetCode Solution2636
296Stone Game LeetCode2630
297Next Greater Element III LeetCode Solution2625
298The Celebrity Problem2624
299Reverse words in a string2601
300Symmetric Tree Leetcode Solution2596
301Count of Triplets With Sum Less than Given Value2589
302Find Words That Can Be Formed by Characters Leetcode Solution2585
303Sudoku Solver2583
304Invalid Transactions LeetCode Solution2577
305Min Stack2577
306One Edit Distance LeetCode Solution2564
307Find Leaves of Binary Tree LeetCode Solution2560
308Find the Closest Palindrome number2556
309Special Array With X Elements Greater Than or Equal X Leetcode Solution2547
310Set Matrix Zeroes Leetcode Solution2537
311Longest Common Subsequence2531
312Find the First and Second Smallest Elements2527
313House Robber2519
314Shortest Word Distance Leetcode Solution2513
315Find Duplicates in an Array in Most Efficient Way2506
316Alien Dictionary LeetCode Solution2494
317Lowest Common Ancestor of a Binary Tree Leetcode Solution2478
318Regular Expression Matching Regular Expression Matching LeetCode Solution2477
319Find The Duplicate Number2473
320Partition Labels LeetCode Solution2472
321Painting Fence Algorithm2472
322Binary Tree Zigzag Level Order Traversal LeetCode Solution2465
323Pair of Positive Negative Values in an Array2463
324Find Top K (or Most Frequent) Numbers in a Stream2458
325Jump Game2458
326Tug of War2453
327Minimum operation to make all elements equal in array2446
328Single Number2437
329Invert Binary Tree LeetCode Solution2432
330Number of Smaller Elements on Right Side2428
331Construct Binary Tree from Given Inorder and Preorder Traversals2414
332Find minimum difference between any two elements2413
333Find Winner on a Tic Tac Toe Game Leetcode Solution2400
334Longest subarray not having more than K distinct elements2398
335Sort Array By Parity II Leetcode Solution2393
336LRU Cache Leetcode Solution2387
337Mobile Numeric Keypad Problem2385
338Minimum Time Visiting All Points Leetcode Solution2383
339Largest Rectangle in Histogram LeetCode Solution2382
340Merge Two Sorted Linked Lists2382
341Remove Nth Node From End of List Leetcode Solution2381
342Maximal Square2379
343Round Robin Scheduling2378
344Common elements in all rows of a given matrix2376
345N-th Tribonacci Number Leetcode Solution2375
346Partition Array Into Three Parts With Equal Sum Leetcode Solution2370
347Rank Transform of an Array Leetcode Solution2369
348Best Time to Buy and Sell Stock with Cooldown Leetcode Solution2363
349Container With Most Water LeetCode Solution2355
350Clone Graph LeetCode Solution2352
351Find Index of Closing Bracket for a Given Opening Bracket in an Expression2350
352Integer Break LeetCode Solution2347
353Reverse Bits2347
354Path With Maximum Minimum Value LeetCode Solution2345
355Minimum Depth of Binary Tree Leetcode Solution2344
356Combination Sum IV LeetCode Solution2343
357Reveal Cards In Increasing Order Leetcode Solution2341
358Least Number of Unique Integers after K Removals Leetcode Solution2338
359Check if a given array contains duplicate elements within k distance from each other2337
360First Circular Tour to Visit all the Petrol Bunks2337
361Find Maximum Level sum in Binary Tree2333
362Longest Palindrome can be Formed by Removing or Rearranging Characters2333
363Find the subarray with least average2330
364Minimum Cost to Hire K Workers2330
365Unique Paths2320
366Longest subsequence such that difference between adjacents is one2318
367Design Browser History LeetCode Solution2317
368Binary Tree Inorder Traversal LeetCode Solution2314
369Minimize Maximum Pair Sum in Array LeetCode Solution2314
370Minimum Moves to Equal Array Elements Leetcode Solution2313
371Sort a stack using a temporary stack2312
372Next Permutation LeetCode Solution2308
373Number of Closed Islands Leetcode Solution2305
374Find the Smallest Divisor given a Threshold Leetcode Solution2298
375Find the Peak Element from an Array2296
376Last Stone Weight II LeetCode Solution2295
377Remove Invalid Parentheses Leetcode Solution2294
378Longest Common Prefix using Sorting2286
379Stone Game II Leetcode2283
380Range Sum Query 2D – Immutable Leetcode Solution2276
381Consecutive Characters LeetCode Solution2275
382Maximum Length of a Concatenated String with Unique Characters Leetcode Solution2274
383LRU Cache Implementation2268
384Remove All Ones With Row and Column Flips Leetcode Solution2265
385Permutation Sequence LeetCode Solution2264
386K Empty Slots LeetCode2264
387Move All the Zeros to the End of the Given Array2262
388Sliding Window Technique2259
389Missing Element in Sorted Array LeetCode Solution2257
390Find duplicates in a given array when elements are not limited to a range2257
391Graph Valid Tree LeetCode Solution2256
392Maximum Circular Subarray Sum2256
393String Matching in an Array Leetcode Solution2250
394Smallest Subarray with k Distinct Numbers2249
395Longest Common Prefix using Trie2241
396Max stack2232
397Design a stack that supports getMin() in O(1) time and O(1) extra space2232
398Top View of Binary Tree2230
399Range Sum of BST LeetCode Solution2228
400Expression Contains Redundant Bracket or Not2223
401Dijkstra Algorithm2222
402Transpose Graph2216
403K Closest Points to Origin Leetcode Solution2211
404Find the Minimum Element in a Sorted and Rotated Array2209
405Maximum Number of Occurrences of a Substring Leetcode Solution2207
406Count Submatrices With All Ones LeetCode Solution2206
407Non-decreasing Array LeetCode Solution2206
408Decompress Run-Length Encoded List Leetcode Solution2205
409Maximum Consecutive Numbers Present in an Array2203
410Sorting array using Stacks2203
411Find a Fixed Point in a Given Array2200
412Queries for counts of array elements with values in given range2197
413Ugly Number II LeetCode Solution2196
414Sort elements by frequency2196
415Multiplication of Two Matrices2196
416Nth Catalan Number2193
417Number of Islands II LeetCode Solution2191
418Implementation of Deque using circular array2191
419Detect a loop in the Linked List2190
420Insert Interval Leetcode Solution2186
421Split Linked List in Parts Leetcode Solution2183
422Snakes and Ladders LeetCode Solution2181
423Vertical Order Traversal of Binary Tree LeetCode Solution2176
424Longest Increasing Path in a Matrix LeetCode Solution2175
425Hamming Distance Leetcode Solution2172
426Kth Non-repeating Character2171
427Given an Array of Pairs Find all Symmetric Pairs in it2165
428Binary Tree Maximum Path Sum LeetCode Solution2163
429How to Implement Stack Using Priority Queue or Heap?2163
430Reverse a linked list2153
431Replace Elements with Greatest Element on Right Side Leetcode Solution2149
432Can Make Arithmetic Progression From Sequence Leetcode Solution2146
433Integer to English words2144
434Number of Days Between Two Dates LeetCode Solution2143
435Guess Number Higher or Lower II2143
436Path Sum II LeetCode Solution2136
437Priority Queue using doubly linked list2131
438Merge Two Binary Trees LeetCode Solution2128
439Minimum Time to Collect All Apples in a Tree LeetCode Solution2126
440Sequences of given length where every element is more than or equal to twice of previous2124
441Paint House LeetCode Solution2121
442Majority Element2121
443Insert Node in the Sorted Linked List2112
444Largest Subarray with Equal Number of 0’s and 1’s2111
445Shortest Completing Word Leetcode Solution2110
446Minimum Path Sum2110
447Minesweeper LeetCode Solution2108
448Queries for GCD of all numbers of an array except elements in a given range2107
449Kth Smallest Element in a BST Leetcode Solution2106
450Search a 2D Matrix II Leetcode Solution2102
451Restore IP Addresses Leetcode Solution2093
452Minimum Number of Steps to Make Two Strings Anagram Leetcode Solutions2089
453Invert Binary Tree LeetCode Solution2087
454Convert Sorted Array to Binary Search Tree Leetcode Solution2075
455Contains Duplicate LeetCode Solution2074
456Minimum Absolute Difference in BST Leetcode Solution2073
457Iterative Method to find Height of Binary Tree2073
458Partition List Leetcode Solution2071
459Stack Permutations (Check if an array is stack permutation of other)2070
460Find a Peak Element II LeetCode Solution2069
461The Stock Span Problem2065
462Odd Even Linked List Leetcode Solution2064
463Best Time to Buy and Sell Stock2062
464Intersection of Two Linked Lists LeetCode Solution2056
465Flood Fill LeetCode2054
466Find All Possible Recipes from Given Supplies LeetCode Solution2051
467Word Search2051
468Unique Paths III LeetCode Solution2050
469Reorder Data in Log Files LeetCode Solution2048
470Minimum Number of Taps to Open to Water a Garden LeetCode Solution2048
471Palindrome Substring Queries2048
472Find Median from Data Stream LeetCode Solution2047
473Pancake Sorting Problem2046
474Count subarrays having total distinct elements same as original array2045
475Convert Sorted Array to Binary Search Tree LeetCode Solutions2044
476Is Graph Bipartite? LeetCode Solution2041
477Gold Mine Problem2041
478Letter Case Permutation2039
479Maximum Sum of Non Consecutive Elements2039
480Search in a Binary Search Tree Leetcode Solution2037
481Longest Common Prefix using Divide and Conquer2037
482Priority Queue in C++2034
483Race Car LeetCode Solution2033
484Number Complement Leetcode Solution2031
485Scramble String LeetCode Solution2030
486Rearrange array such that even positioned are greater than odd2030
487Generate all Binary Strings from Given Pattern2027
488Count Possible Triangles2025
489Reverse Nodes in k-Group LeetCode Solution2023
490The Maze III LeetCode Solution2023
491Design Hit Counter LeetCode Solution2018
492Implement Trie (Prefix Tree) Leetcode Solution2011
493Toeplitz Matrix2007
494Find Pythagorean Triplets from Array1993
495Convert BST to Min Heap1985
496Distance of nearest cell having 1 in a binary matrix1975
497Rearrange an array in order – smallest, largest, 2nd smallest, 2nd largest1974
498Cells with Odd Values in a Matrix LeetCode Solution1969
499Implement Two Stacks in an Array1969
500Number of Subsequences That Satisfy the Given Sum Condition LeetCode solution1966
501Find the first Repeating Number in a Given Array1966
502Shortest Palindrome1963
503Best Time to Buy and Sell Stock with Transaction Fee Leetcode Solution1961
504Recursion1958
505Kth ancestor of a node in binary tree1957
506Kruskal Algorithm1953
507Print all Palindromic Partitions of a String1952
508Minimum Jumps to Reach Home LeetCode Solution1945
509Maximum Subarray1944
510Palindrome Permutation LeetCode Solution1940
511Evaluate Reverse Polish Notation LeetCode Solution1935
512Bitwise AND of Numbers Range LeetCode Solution1935
513Divide Chocolate LeetCode Solution1931
514Group Anagrams1931
515Minimum Bracket Reversals1930
516Trapping Rain Water LeetCode Solution1925
517Longest Repeated Subsequence1924
518Postfix to Prefix Conversion1924
519Validate Stack Sequences LeetCode Solution1923
520Interval Tree1923
521How to Create Mergable Stack?1922
522Find Minimum in Rotated Sorted Array II LeetCode Solution1920
523Sieve of Eratosthenes1912
524Insert into a Binary Search Tree Leetcode Solution1911
525Check if Array Contains Contiguous Integers With Duplicates Allowed1910
526Minimum Height Trees1910
527Tiling Problem1907
528Balanced Expression with Replacement1905
529Longest Substring with At Least K Repeating Characters LeetCode Solution1896
530Maximum Length of Chain Pairs1894
531Jump Game IV LeetCode Solution1892
532Contains Duplicate1892
533LCS (Longest Common Subsequence) of three strings1885
534Maximum Element in an Array which is Increasing and then Decreasing1885
535Check If Array Pairs Are Divisible by k LeetCode Solution1881
536Different Ways to Add Parentheses Leetcode Solution1878
537Find the two Numbers with Odd Occurrences in an Unsorted Array1877
538Coin Change Problem1876
539Determine Whether Matrix Can Be Obtained By Rotation LeetCode Solution1874
540Decode String1874
541N queen problem1870
542Sort an array according to the order defined by another array1869
543Recover Binary Search Tree Leetcode Solution1868
544Sorted Linked List to Balanced BST1867
545Champagne Tower LeetCode Solution1866
546Fibonacci numbers1866
547Merge Overlapping Intervals1862
548Find a Sorted Subsequence of size 31861
549High Five LeetCode Solution1858
550Find the Lost Element From a Duplicated Array1858
551Subarrays with K Different Integers Leetcode Solution1857
552Edit Distance LeetCode Solution1848
553Check if Two given Strings are Isomorphic to each other1841
554Decode Ways1837
555Build an Array With Stack Operations Leetcode Solution1836
556Spiral Matrix III LeetCode Solution1834
557Sort Colors1831
558Number of Distinct Islands Leetcode Solution1827
559Palindrome Permutations of a String1824
560Substring with Concatenation of All Words Leetcode Solution1823
5614Sum1823
562Merge Overlapping Intervals II1822
563K-th Distinct Element in an Array1820
564Analyze User Website Visit Pattern LeetCode Solution1818
565Find if an Expression has Duplicate Parenthesis or Not1804
566Reorder an Array According to the Given Indexes1794
567Maximum Depth of N-ary Tree Leetcode Solution1791
568Sliding Window Median Leetcode Solution1790
569Swapping Nodes in a Linked List Leetcode Solution1790
570Queue based approach for first non-repeating character in a stream1790
571Subset sum problem1790
572Rectangle Overlap LeetCode Solution1789
573Largest rectangular sub-matrix whose sum is 01787
574Custom Sort String Leetcode Solution1786
575Find the Subarray of given length with Least Average1783
576Nearest Exit from Entrance in Maze LeetCode Solution1779
577Design a Stack With Increment Operation Leetcode Solution1779
578Maximum Number of Chocolates to be Distributed Equally Among k Students1776
579Merge Two Balanced Binary Search Trees1768
580Possible Bipartition LeetCode Solution1766
581Sliding Window Maximum1764
582Monotonic Array Leetcode Solution1763
583Find Largest Value in Each Tree Row LeetCode Solution1762
584Number of Equivalent Domino Pairs Leetcode Solution1761
585Detect Capital Leetcode Solution1757
586Camelcase Matching Leetcode Solution1754
587Make Two Arrays Equal by Reversing Sub-arrays Leetcode Solution1752
588Maximum sum rectangle in a 2D matrix1752
589Caesar Cipher1749
590Longest Substring with At Most K Distinct Characters LeetCode Solution1747
591Find maximum length Snake sequence1747
592First missing positive1745
593Palindromic Substrings Leetcode Solution1738
594Minimum Height Trees LeetCode Solution1735
595Maximize Elements Using Another Array1725
596Most Stones Removed with Same Row or Column LeetCode Solution1723
597Shifting Letters LeetCode Solution1723
598Find Maximum of Minimum for Every Window Size in a Given Array1723
599Maximum Product of Splitted Binary Tree LeetCode Solution1720
600Valid Boomerang Leetcode Solution1719
601Check if a Linked list of Strings form a Palindrome1719
602Distance Between Bus Stops Leetcode Solution1712
603Sliding Window Maximum LeetCode Solution1709
604Palindrome Partitioning Leetcode Solution1706
605Best Meeting Point LeetCode Solution1705
6063 Sum1705
607Sort a stack using recursion1704
608Sort a String According to Another String1701
609Contiguous Array LeetCode Solution1690
610Word Break1690
611Pair with given product1688
612A Space Optimized DP solution for 0-1 Knapsack Problem1687
613How to Efficiently Implement k Stacks in a Single Array?1687
614Brick Wall LeetCode Solution1685
615Maximum Frequency Stack Leetcode Solution1685
616Web Crawler LeetCode Solution1678
617Find all pairs (a, b) in an array such that a % b = k1677
618Populating Next Right Pointers in Each Node Leetcode Solution1675
619Minimum Sum Path in a Triangle1674
620Check if the given array can represent Level Order Traversal of Binary Search Tree1674
621Find Zeros to be Flipped so that Number of Consecutive 1’s is Maximized1673
622Perfect Squares LeetCode Solution1671
623Palindrome Permutation1669
624Perform String Shifts Leetcode1669
625Number of palindromic paths in a matrix1668
626Merge K Sorted Arrays and Print Sorted Output1668
627Check if String Follows Order of Characters by a Pattern or not1667
628Find the First Circular Tour that visits all the Petrol Pumps1665
629Elements Appear more than N/K times in Array1663
630Partition Problem1662
631Binary Tree zigzag level order Traversal1657
632Rearrange Spaces Between Words Leetcode Solution1651
633Split Array Into Consecutive Subsequences1651
634Count pair with Given Sum1650
635Find Median from data Stream1646
636Find the Town Judge LeetCode Solution1645
637Convert Sorted List to Binary Search Tree1641
638Morris Traversal1637
639Valid Sudoku1637
640Queue using Stacks1624
641Valid Parentheses Leetcode Solution1616
642Special Positions in a Binary Matrix Leetcode Solution1616
643Add two numbers1614
644My Calendar I LeetCode Solution1612
645Sort 0s 1s and 2s in an Array1611
646Find First and Last Position of Element in Sorted Array LeetCode Solution1608
647Construction of Longest Increasing Subsequence (N log N)1605
648Maximum Number of Ways to Partition an Array LeetCode Solution1603
649Maximum difference between two elements such as larger element comes after smaller1602
650Print Fibonacci sequence using 2 variables1601
651Huffman Coding1600
652Minimum Swaps to Group All 1’s Together Leetcode Solution1599
653All Unique Triplets that Sum up to a Given Value1597
654Print all subarrays with 0 sum1594
655Finding K closest element1593
656Word Pattern1591
657Construct BST from its given Level Order Traversal1590
658Partition to K Equal Sum Subsets Leetcode Solution1589
659Longest Subarray Having Count of 1s One More than Count of 0s1587
660Nested List Weight Sum II LeetCode Solution1584
661Remove Palindromic Subsequences Leetcode Solution1584
662Count items common to both the lists but with different prices1583
663Mean of Array After Removing Some Elements Leetcode Solution1581
664Reach a Number LeetCode Solution1580
665All Possible Full Binary Trees LeetCode Solution1579
666Reorder Array Using Given Indexes1579
667Count ways to reach the nth stair using step 1, 2 or 31578
668Remove brackets from an algebraic string containing + and – operators1576
669Largest Sum Contiguous Subarray1575
670Recover Binary Search Tree1575
671Difference Array | Range update query in O(1)1570
672Find whether a subarray is in form of a mountain or not1570
673Rearrange an Array Such that arr[i] is equal to i1569
674Minimum number of jumps to reach end1568
675Swap Kth Node from beginning with Kth Node from End1568
676Smallest Good Base1565
677Merge K Sorted Linked Lists1554
678Group Multiple Occurrence of Array Elements Ordered by first Occurrence1549
679Level order Traversal in Spiral Form1547
680Populating Next Right Pointers in Each Node1547
681Find All Pairs With a Given Difference1547
682Count Distinct Elements in Every Window of Size K1546
683MiniMax Algorithm1546
684Check if any two intervals overlap among a given set of intervals1537
685Count Minimum Steps to Get the given Array1536
686Lowest Common Ancestor of a Binary Search Tree Leetcode Solution1535
687Length of Longest Fibonacci Subsequence1534
688Maximum Product Subarray II1533
689Concatenation of Array LeetCode Solution1528
690Maximum Distance in Array1525
691Find four elements that sum to a given value (Hashmap)1524
692Minimum Distance Between BST Nodes Leetcode Solution1523
693Minimum time required to rot all oranges1523
694Find Duplicate Subtrees1519
695Construct BST from given Preorder Traversal1518
696Increasing Subsequence of Length three with Maximum Product1516
697Segregate 0s and 1s in an Array1510
698Linked List Cycle1508
699Bubble sort using two Stacks1506
700Count Sub Islands LeetCode Solution1503
701Rearrange Array such that arr[i] >= arr[j] if i is even and arr[i] <= arr[j] if i is odd and j < i1503
702Check for Balanced Parentheses in an Expression1503
703Counting Bits1502
704Validate Binary Search Tree1502
705Shortest Path in a Grid with Obstacles Elimination LeetCode Solution1501
706Flatten 2D Vector LeetCode Solution1499
707Check if Two Expressions With Brackets are Same1496
708Design Skiplist LeetCode Solution1485
709Fibonacci Number LeetCode Solution1484
710An Interesting Method to generate Binary Numbers from 1 to n1483
711Best Time to Buy and Sell Stock IV LeetCode Solution1476
712Binary Tree to Binary Search Tree Conversion1465
713Implement strStr() LeetCode Solution1464
714Find all triplets with zero sum1461
715Maximize Sum of Array after K Negations Leetcode Solution1459
716K maximum sums of overlapping contiguous sub-arrays1459
717Isomorphic Strings LeetCode Solution1456
718Smallest Range II Leetcode Solution1456
719Heap Sort1456
720Sorting a K Sorted Array1453
721Longest Common Prefix Using Binary Search II1451
722Binary Tree Right Side View LeetCode Solution1447
723Queue Reconstruction by Height1446
724Range Sum Query 2D – Immutable LeetCode Solution1443
725Inorder Successor of a node in Binary Tree1440
726Merge Two Sorted Lists Leetcode1433
727String comparison containing wildcards1433
728Delete Nth node from the end of the given linked list1427
729Find subarray with given sum (Handles Negative Numbers)1424
730Reverse Nodes in K-Group1423
731Union and Intersection of two Linked Lists1421
732Sum Root to Leaf Numbers LeetCode Solution1420
733Container with Most Water1418
734Symmetric Tree1410
735Contiguous Array Leetcode1406
736Minimum Swaps to Make Strings Equal Leetcode Solution1405
737Root to Leaf path with target sum Leetcode Solutions1401
738Climbing stairs1397
739Print a Binary Tree in Vertical Order1396
740Longest Common Prefix Word by Word Matching1393
741Vertical sum in a given binary tree1387
742Delete Nodes and Return Forest Leetcode Solution1383
743Longest Increasing Subsequence1382
744Merging Intervals1382
745Minimum Cost to Move Chips to The Same Position LeetCode Solution1380
746Kill Process LeetCode Solution1379
747Count pairs from two linked lists whose sum is equal to a given value1379
748Valid Parenthesis String1373
749Alien Dictionary1373
750Find K Closest Elements LeetCode Solution1372
751Happy Number1371
752Parallel Courses II LeetCode Solution1370
753Iterative Depth First Traversal of Graph1369
754Queries on Probability of Even or Odd Number in given Ranges1366
755Unique Binary Search Trees1365
756Substring With Concatenation Of All Words1364
757Score of Parenthesis LeetCode Solution1362
758Serialize and Deserialize Binary Tree LeetCode Solution1360
759Path Crossing Leetcode Solution1360
760Peak Index in a Mountain Array LeetCode Solution1359
761New 21 Game1357
762Check if a queue can be sorted into another queue using a stack1356
763Find Maximum Sum Possible Equal Sum of Three Stacks1355
764Breadth First Search (BFS) for a Graph1350
765Find pairs with given sum such that elements of pair are in different rows1349
766Median of Two Sorted Arrays1342
767Maximum size subarray sum equals k1338
768Construct Binary Tree from given Parent Array representation1335
769Range LCM Queries1334
770Tree Traversal (Preorder, Inorder & Postorder)1332
771Find Nth Node1324
772Find the Difference Leetcode Solution1323
773Find the largest multiple of 31321
774Minimum Size Subarray Sum1321
775Closest Leaf in a Binary Tree LeetCode Solution1319
776Maximum Score After Splitting a String Leetcode Solution1319
777Check if a given array can represent Preorder Traversal of Binary Search Tree1318
778Remove duplicates from sorted array1317
779Find Three Element From Different Three Arrays Such That a + b + c = sum1317
780Non-overlapping sum of two sets1316
781Rotate Array1316
782Find Sum of all unique sub-array sum for a given array1313
783Verify Preorder Serialization of a Binary Tree1313
784Matrix Chain Multiplication1311
785Boolean Parenthesization Problem1307
786Infix to Postfix1306
787Iterative Preorder Traversal1304
788Number of siblings of a given Node in n-ary Tree1304
789Print all triplets in sorted array that form AP1303
790Given a binary tree, how do you remove all the half nodes?1303
791Remove Duplicates from Sorted List II1303
792Find Element Using Binary Search in Sorted Array1303
793Find K Length Subarray of Maximum Average1300
794Find the first repeating element in an array of integers1298
795Count and Say1296
796Count Good Nodes in Binary Tree LeetCode Solution1292
797Maximum subsequence sum such that no three are consecutive1292
798Check Completeness of a Binary Tree LeetCode Solution1288
799Bold Words in String LeetCode Solution1282
800The Painter’s Partition Problem1279
801Construct Binary Tree from Preorder and Postorder Traversal LeetCode Solution1277
802Sort Array by Increasing Frequency Leetcode Solution1277
803Boundary Traversal of binary tree1277
804Partition Equal Subset Sum1273
805Sum of f(a[i], a[j]) over all pairs in an array of n integers1272
806Find Peak Element1271
807Reservoir Sampling1269
808Find distance between two nodes of a Binary Tree1268
809Maximum Product Subarray1268
810Friends Of Appropriate Ages LeetCode Solution1266
811Print All Distinct Elements of a Given Integer Array1263
812Hamming Distance1263
813Employee Importance LeetCode Solution1260
814Subset Sum Problem in O(sum) space1259
815Create Maximum Number1259
816Isomorphic Strings1258
817Longest Palindromic Subsequence1247
818Find Common Characters Leetcode Solution1244
819Products of ranges in an array1244
820Four Elements that Sum to Given1244
821Level order traversal using two Queues1240
822Valid Anagrams1237
823Transform a BST to Greater sum Tree1237
824Minimum Remove to Make Valid Parentheses LeetCode Solution1235
825Flatten Binary Tree to Linked List LeetCode Solution1234
826Missing Number1234
827Largest BST Subtree LeetCode Solution1229
828Valid Number1228
829Third Maximum Number Leetcode Solution1226
830Distinct Subsequences1216
831Next Greater Element II LeetCode Solution1214
832Filter Restaurants by Vegan-Friendly, Price and Distance Leetcode Solution1211
833Largest divisible pairs subset1208
834Merge Two Sorted Arrays1206
835Palindrome Partitioning1204
836Defanging an IP Address LeetCode Solution1203
837Binary array after M range toggle operations1203
838Minimum Number of Arrows to Burst Balloons LeetCode Solution1202
839Find minimum number of merge operations to make an array palindrome1201
840Sort Elements by Frequency II1199
841Pancake Sorting1199
842Kth Smallest Element in a Sorted Matrix LeetCode Solution1198
843Count number of triplets with product equal to given number1192
844Super Ugly Number1188
845Unique Binary Search Trees LeetCode Solution1187
846Maximum Sum of 3 Non-Overlapping Subarrays1187
847BFS vs DFS for Binary Tree1186
848Diameter of N-Ary Tree LeetCode Solution1185
849Level of Each node in a Tree from source node1183
850Number Of Longest Increasing Subsequence1177
851Binary Tree Longest Consecutive Sequence LeetCode Solution1174
852Next Greater Element in an Array1173
853Integer to Roman1172
854Valid Triangle Number LeetCode Solution1171
855Kth Smallest Number in Multiplication Table Leetcode Solution1164
856Check if two nodes are on the same path in a Tree1164
857Averages of Levels in Binary Tree1163
858Deletion in a Binary Tree1161
859Maximum number of segments of lengths a, b and c1160
860Path Sum1159
861Maximum Population Year LeetCode Solution1158
862Permutations of a Given String Using STL1158
863Array Nesting Leetcode Solution1157
864Trapping Rain Water II LeetCode Solution1155
865Largest Submatrix With Rearrangements LeetCode Solution1155
866Maximum difference between first and last indexes of an element in array1155
867Maximum Side Length of a Square with Sum Less than or Equal to Threshold LeetCode Solution1153
868Shuffle an Array1153
869Reorganize String1143
870Find Smallest Range Containing Elements from k Lists1142
871Valid Triangle Number LeetCode Solution1141
872Insert Delete GetRandom1140
873Closest Binary Search Tree Value Leetcode Solution1137
874Compare Strings by Frequency of the Smallest Character Leetcode Solution1133
875Topological Sorting1129
876Sentence Screen Fitting LeetCode Solution1127
877Encoded String With Shortest Length LeetCode Solution1123
878Stone Game IV LeetCode Solution1121
879Binary Search Tree Search and Insertion1121
880Find Largest d in Array such that a + b + c = d1117
881Count the Pairs at Same Distance as in English Alphabets1116
882Merging Two Sorted Arrays1116
883Largest subarray with equal number of 0s and 1s1112
884Newman-Conway Sequence1111
885Find Minimum In Rotated Sorted Array1110
886Binary Search Tree Delete Operation1108
887Reverse a Path in BST using Queue1107
888Find unique character in a string1103
889Maximum difference between frequency of two elements such that element having greater frequency is also greater1102
890Count Primes in Ranges1102
891Minimum sum of squares of character counts in a given string after removing k characters1102
892Print Right View of a Binary Tree1096
893Valid Tic-Tac-Toe State LeetCode Solution1094
894Iterative Postorder Traversal Using Two Stacks1094
895Contiguous Array1093
896Lowest Common Ancestor1092
897Arrange given numbers to form the biggest number1090
898Advantages of BST over Hash Table1086
899First Bad Version1085
900Red-Black Tree Introduction1084
901Valid Perfect Square LeetCode Solution1083
902Longest Substring Without Repeating Characters Leetcode Solution1082
903Lower Case To Upper Case1082
904Maximum Product Subarray1078
905Sorted Array to Balanced BST1075
906Stone Game IV LeetCode Solution1070
907Range Minimum Query (Square Root Decomposition and Sparse Table)1069
908Longest Bitonic Subsequence1068
909Swap Nodes In Pairs1067
910Koko Eating Bananas LeetCode Solution1066
911Orderly Queue LeetCode Solution1066
912Arithmetic Slices II – Subsequence LeetCode Solution1065
913Balanced Binary Tree1065
914Serialize and Deserialize Binary Tree1062
915Diagonal Traversal of Binary Tree1061
916Minimum insertions to form a palindrome with permutations allowed1059
917Level Order Traversal of Binary Tree1059
918Friends Pairing Problem1058
919Largest Plus Sign Leetcode Solution1055
920Step-By-Step Directions From a Binary Tree Node to Another LeetCode Solution1050
921A program to check if a binary tree is BST or not1042
922Total Hamming Distance LeetCode Solution1041
923Check if all levels of two Binary Tree are anagrams or not1041
924Queries for Number of Distinct Elements in a Subarray1040
925Minimum Swaps To Make Sequences Increasing LeetCode Solution1039
926Find the smallest binary digit multiple of given number1039
927Construct Complete Binary Tree from its Linked List Representation1036
928Best Meeting Point LeetCode Solution1035
929Bottom View of a Binary Tree1034
930Height of a generic tree from parent array1033
931Longest Increasing Consecutive Subsequence1019
932Search in Sorted Rotated Array1018
933Dividing Array into Pairs With Sum Divisible by K1017
934Rearrange an array such that ‘arr[j]’ becomes ‘i’ if ‘arr[i]’ is ‘j’1016
935Edit Distance1014
936Guess The Word1013
937Maximum Sum Increasing Subsequence1011
938Maximum Product Subarray1010
939Range Sum Query using Sparse Table1009
940Find the node with minimum value in a Binary Search Tree1009
941Convert BST into a Min-Heap without using array1008
942Find postorder traversal of BST from preorder traversal1007
943Constant time range add operation on an array1007
944Design Add and Search Words Data Structure LeetCode Solution1005
945Kth Smallest Product of Two Sorted Arrays LeetCode Solution1005
946Print Next Greater Number of Q queries1002
947Check if an Array is Stack Sortable1001
948Shuffle a given Array1001
949The Number of Weak Characters in the Game LeetCode Solution999
950Greatest Sum Divisible by Three LeetCode Solution999
951Longest Common Prefix using Character by Character Matching998
952Print n terms of Newman-Conway Sequence994
953Print all Possible Ways to Break a String in Bracket Form989
954Next greater element986
955Write a function to get the intersection point of two Linked Lists982
956Queries on XOR of greatest odd divisor of the range981
957K’th Largest element in BST using constant extra space981
958Collect maximum points in a grid using two traversals981
959Print modified array after multiple array range increment operations980
960Group Shifted Strings Leetcode Solution977
961Insert into a Sorted Circular Linked List LeetCode Solution976
962Array Queries for multiply replacements and product974
963Find Maximum Depth of Nested Parenthesis in a String969
964Priority Queue968
965Design Underground System Leetcode Solution964
966Swim in Rising Water LeetCode Solution962
967K’th Largest Element in BST when modification to BST is not allowed961
968Segment Tree954
969Clone a Binary Tree with Random Pointers951
970Image Overlap LeetCode Solution947
971Merge Sort945
972Maximum Array from Two given Arrays Keeping Order Same941
973Power of Two941
974Count and Toggle Queries on a Binary Array940
975Excel Sheet Column Number LeetCode Solution939
976Moving Stones Until Consecutive Leetcode Solution939
977Minimum Possible Integer After at Most K Adjacent Swaps On Digits LeetCode Solution936
978Binary Search Tree935
979Range Queries for Longest Correct Bracket Subsequence931
980Write Code to Determine if Two Trees are Identical928
981Numbers with prime frequencies greater than or equal to k928
982Form minimum number from given sequence923
983Decrease Elements To Make Array Zigzag LeetCode Solution912
984Check for Palindrome after every character replacement Query912
985Check if each internal node of a BST has exactly one child910
986Cutting a Rod908
987K Empty Slots904
988Form Minimum Number From Given Sequence902
989Number of elements less than or equal to a given number in a given subarray898
990Number of Orders in the Backlog Leetcode Solution896
991Count even length binary sequences with same sum of first and second half bits896
992Merge Sorted Array895
993Random Pick Index LeetCode Solution894
994Factorial Trailing Zeroes LeetCode Solution894
995Merge two BSTs with limited extra space893
996Check if X can give change to every person in the Queue890
997Lowest Common Ancestor in Binary Search Tree886
998Regular Expression Matching880
999Minimum Moves to Equal Array Elements LeetCode Solution878
1000Insert Delete GetRandom O(1) – Duplicates allowed LeetCode Solution868
1001Kth Smallest Element in a BST868
1002Maximum weight transformation of a given string867
1003Shortest Unsorted Continuous Subarray LeetCode Solution866
1004Sum of Left Leaves LeetCode Solution864
1005How to print maximum number of A’s using given four keys864
1006Symmetric Tree LeetCode Solution Leetcode Solution862
1007Find maximum average subarray of k length855
1008Graph Cloning852
1009Count Pairs Whose Products Exist in Array848
1010Closest Binary Search Tree Value II LeetCode Solution842
1011Search an Element in Sorted Rotated Array841
1012Maximum Depth Of Binary Tree839
1013Queries for Decimal Values of Subarrays of a Binary Array838
1014Print Ancestors of a Given Binary Tree Node Without Recursion835
1015Unique Paths II834
1016Find k-th smallest element in BST (Order Statistics in BST)830
1017Convert a BST to a Binary Tree such that sum of all greater keys is added to every key819
1018Minimum Number of Operations to Move All Balls to Each Box LeetCode Solution816
1019Maximum Binary Tree803
1020Check given array of size n can represent BST of n levels or not800
1021Excel Sheet Column Title LeetCode Solution781
1022Data Structure Designing781
1023Iterative method to find ancestors of a given binary tree767
1024Palindrome Partitioning750
1025Next Greater Element I Leetcode Solution726
1026Find the Town Judge LeetCode Solution722
1027Find Two Non-overlapping Sub-arrays Each With Target Sum LeetCode Solution720
1028Binary Tree to Binary Search Tree Conversion using STL set713
1029Print Maximum Length Chain of Pairs706
1030Peeking Iterator LeetCode Solution679
1031Flatten Binary Tree to Linked List LeetCode Solution612
Translate »