Skip to content

Files

Latest commit

d8ef008 · Apr 19, 2025

History

History
executable file
·
556 lines (554 loc) · 40.4 KB

README.md

File metadata and controls

executable file
·
556 lines (554 loc) · 40.4 KB

List of Questions

Note : The Sample_Question_title can be in the format => [<Question_name>](./<path_to_question_folder>)

Sno Question Title Status Key Points
1 Game Of Names Incomplete
2 Infix to Postfix Expression Conversion
3 Maximum Coin Sum
4 Postfix Evaluvation
5 Premium Game Incomplete
6 Roadies
7 Self Adjusting List
8 Sequence of Sequence
9 String Permutation
10 Togetherness as a Family
11 Training
12 Minimum Sum in Two Arrays
13 Hard Cash
14 Chef and Railway Stations
15 Tax Slabs
16 ATM (HS08TEST)
17 Pintu and Fruits
18 Allocation
19 Lost Guy Radhu
20 COVID Pandemic and Long Queue
21 Triple Sort
22 Prison Labor Dodgers
23 Don't Get Volunteered
24 En Route Salute
25 Fuel Injection Perfection
26 Find the Access Codes
27 Doomsday Fuel Needs another Look
28 Chef and Price Control
29 Chef and String
30 Chef and Icecream
31 The Tom and Jerry Game!
32 Even Matrix
33 Bytelandian gold coins
34 Marbles
35 Chef and Demonetisation
36 Number of Groups
37 Increasing Decreasing
38 Chef and Strings
39 Chef and Card Game
40 Ada King
41 Missing a Point
42 Chefina and Swaps
43 Doctor Chef
44 Swayamvar
45 Digit Pairs
46 Sell All the Cars
47 Strange Number
48 Unit GCD Incomplete
49 Squared Subsequences Incomplete
50 Vestigium
51 Nesting Depths
52 Parenting Partnering Returns
53 Coronavirus Spread
54 Isolation Centers
55 Chef and Bitwise Product Incomplete
56 Sorting Vases Incomplete
57 Ways Of Coloring Incomplete
58 Necklace Problem Incomplete
59 Bheem and Permutation Incomplete
60 Bob Hates XORs Incomplete
61 Indumanti and Fraction Incomplete
62 City and Concert Incomplete
63 Two Sum
64 Add Two Numbers
65 Longest Substring Without Repeating Characters
66 Median of Two Sorted Arrays Important
67 Reverse Integer
68 Longest Palindromic Substring Manacher's Algorithm
69 Palindrome Number
70 ZigZag Conversion
71 String to Integer atoi
72 Container With Most Water Standard Problem
73 Regular Expression Matching Regex Matching Using DP
74 Kadane's Algorithm Kadane's Algorithm Maximum Sum Contiguous Subarray
75 Delete without head pointer
76 Strongly Connected Components Kosaraju's Algorithm
77 LRU Cache LRU Cache
78 Kth largest element in a stream
79 Subarray with given sum
80 Count the triplets
81 Missing number in array XOR Manipulation of stream of numbers
82 Merge Without Extra Space Important Using Gaps to merge two sorted arrays Calculate number of swaps needed for sorting
83 Rearrange Array Alternately Encoding numbers using modulus
84 Number of pairs Python's bisect library
85 Reverse words in a given string
86 Parenthesis Matching
87 Inversion of array Merge Sort
88 Recursively remove all adjacent duplicates
89 Check if string is rotated by two places
90 Roman Number to Integer Roman number to integer conversion
91 Finding middle element in a linked list 2 pointers Linked List traversal
92 Match a Substring to String
93 Logical Understanding
94 Programming Convolution Image Convolutions
95 Programming Padding Image Padding
96 Square arrays
97 Anagram
98 Sort an array of 0s, 1s and 2s
99 Equilibrium Point
100 Minimum Platforms Job Scheduling
101 Remove Duplicates
102 Leaders in an array Time Difference in Array Appending and addition of arrays
103 Reverse array in groups
104 Form a palindrome Longest Palindromic Subsequence
105 Longest Distinct characters in string
106 Longest Common Prefix in an Array
107 Trapping Rain Water Trapping Water Problem
108 Chocolate Distribution Problem
109 Stock buy and sell
110 Element with left side smaller and right side greater
111 Convert array into Zig-Zag fashion
112 Spirally traversing a matrix Matrix Spiral Traversal
113 Largest Number formed from an Array Merge Sort
114 Rotate a Linked List
115 Reverse a Linked List in groups of given size
116 Intersection Point in Y Shapped Linked Lists Intersection Point of two Linked Lists
117 Detect Loop in linked list Floyd's Loop Detection
118 Remove loop in Linked List Linked-list Loop Detection
119 Nth node from end of linked list
120 Flattening a Linked List
121 Merge two sorted linked lists
122 Add two numbers represented by linked lists
123 Check if Linked List is Palindrome
124 Implement Queue using Linked List
125 Implement Stack using Linked List
126 Next Greater Element
127 Queue using two Stacks
128 Stack using two queues
129 Get minimum element from stack Encoding - Decoding
130 Circular tour Circular Tour Petrol Pumps
131 First non-repeating character in a stream
132 Rotten Oranges
133 Left View of Binary Tree
134 Maximum of all subarrays of size k Dequeue Sliding Window Maximum
135 PCM Dilemma
136 Memcached Service
137 Chef and Laddus For Children
138 Students, heights and their IQs Incomplete
139 Check for BST
140 Bottom View of Binary Tree
141 Vertical Traversal of Binary Tree
142 Level order traversal in spiral form
143 Connect Nodes at Same Level
144 Lowest Common Ancestor in a BST
145 Binary Tree to Double Linked List Tree InOrder Traversal
146 Symmetric Tree
147 Height of Binary Tree
148 Maximum Path Sum between 2 Leaf Nodes
149 Diameter of Binary Tree
150 Check for Balanced Tree
151 Serialize and Deserialize a Binary Tree
152 Find median in a stream Heap with Streams
153 Heap Sort Heap Sort
154 Binary Heap Operations
155 Rearrange characters Heapq library with custom predicate
156 Merge K sorted linked lists Heaps
157 Flood fill Algorithm
158 Number of paths math
159 Combination Sum
160 Special Keyboard Dynamic Programming Approach
161 Josephus problem Josephus Problem -- Math + Recursion
162 Sort an array according to the other Heap + Hash Table
163 Sorting Elements of an Array by Frequency Custom hybrid sort function in python
164 Largest subarray with Zero sum Sub-Array Sum
165 Common Elements
166 Find All Four Sum Numbers
167 Swapping pairs make sum equal Incomplete
168 Depth First Traversal of Graph
169 Breadth First Traversal of Graph
170 Detect cycle in an undirected graph
171 Detect cycle in a directed graph
172 Count distinct elements in every window
173 Array Pair Sum Divisibility Problem
174 Longest consecutive subsequence
175 Array Subset of another array
176 Find all pairs with a given sum
177 Zero Sum Subarrays Zero Sum Subarray
178 Minimum indexed character
179 Check if two arrays are equal or not
180 Uncommon characters
181 Smallest window containing characters of another string two-pointers string
182 Check if frequencies can be equal
183 Topological sort Topological Sort
184 Find the number of islands Island Find
185 Dijkstra Algorithm Dijkstra
186 Minimum Swaps to Sort Minimum swaps for sorting -- Graph
187 Shortest Source to Destination Path in a Grid
188 Find whether path exist
189 Minimum Cost Path BFS with Min Heap
190 Circle of strings Modelling array problem into graph Eulerian Circuit
191 Special Matrix Needs another look Matrix based
192 Floyd Warshall Floyd Warshall All Pairs Shortest Path problem
193 Alien Dictionary Topological Sort
194 Snake and Ladder Problem
195 Find Missing And Repeating Math
196 Activity Selection Greedy
197 Choose and Swap
198 Page Faults in LRU LRU Cache Dequeue
199 Largest number possible
200 Minimize the Heights Needs another look Greedy
201 Huffman Decoding Huffman Encoding
202 Minimum Spanning Tree Minimum Spanning Tree Greedy
203 Shop in Candy Store
204 Geek collects the balls
205 Maximum Index
206 Consecutive 1's not allowed New Perspective Fibonacci Series Dynamic Programming
207 Two numbers with sum closest to zero Two Pointer
208 Minimum Operations
209 Max length chain Dynamic Programming
210 Minimum number of Coins
211 Longest Common Substring Dynamic Programming
212 Longest Increasing Subsequence New Perspective Dynamic Programming Binary Search Increasing Subsequence
213 Longest Common Subsequence Longest Common Subsequence
214 0 - 1 Knapsack Problem 0 - 1 Knapsack Dynamic Programming
215 Maximum sum increasing subsequence Dynamic Programming Increasing Subsequence
216 Minimum number of jumps
217 Edit Distance Edit Distance Dynamic Programming
218 Coin Change New Perspective Dynamic Programming Partition table Unbounded Knapsack
219 Partition Equal Subset Sum Partition table Dynamic Programming
220 Smallest Positive missing number
221 Box Stacking Box Stacking Dynamic Programming
222 Maximize The Cut Segments Dynamic Programming Rod Cutting
223 Maximum path sum in matrix
224 Minimum sum partition Important Dynamic Programming
225 Count number of hops Dynamic Programming Simplified DP array
226 Egg Dropping Puzzle Needs Another Look New Perspective Dynamic Programming Egg Drop
227 Optimal Strategy For A Game Dynamic Programming New Perspective Game Strategy
228 Most frequent word in an array of strings
229 CamelCase Pattern Matching Trie
230 String Ignorance
231 Shortest Common Supersequence Length Dynamic Programming
232 Design a tiny URL or URL shortener
233 Find the element that appears once in sorted array
234 Search in a Rotated Array
235 Sum of Middle Elements of two sorted arrays Incomplete
236 Colorful Strings Permutation
237 Longest consecutive sequence in Binary tree
238 Lowest Common Ancestor in a Binary Tree
239 K-th element of two sorted Arrays Simultaneous Multiple Array Divide and Conquer
240 Candies Problem
241 Cross the Buildings
242 Happiest Class
243 Maching Sets
244 Course Registration Kahn's Algorithm
245 Quick Sort Quick Sort
246 Generate IP Addresses
247 Word Boggle Backtracking Trie
248 Rotate Bits
249 Rat in a Maze Problem
250 Solve the Sudoku Sudoku
251 Count total set bits Bit based
252 Swap all odd and even bits
253 Maximum subset XOR Needs another Look Bitwise Gaussian Elimination
254 N-Queen Problem N Queen
255 Top View of a Tree
256 Down to Zero II Modelling Greedy into Dynamic Programming
257 Almost Sorted
258 Queen's Attack II
259 Bigger is Greater
260 Generate Parentheses
261 Is Sudoku Valid
262 X Total Shapes Graph Coloring
263 Merge k Sorted Arrays Heaps
264 Prerequisite Tasks Cycle Detection Graph
265 Min Steps in Infinite Grid Arrays
266 Minimum Lights to Activate
267 Maximum Sum Triplet Needs another Look Arrays
268 Prime Sum
269 Max Non Negative SubArray
270 Perfect Peak of Array
271 Diagonal Traversal of Binary Tree
272 Largest Number Custom Compare Function
273 First Missing Integer Array Filtering
274 Merge new interval into NonOverlapping Intervals
275 Next Similar Number Number Arrangement
276 Rearrange Array Number Encoding
277 Numbers of length N and value less than K Partially Incomplete Needs another Look Dynamic Programming
278 Square Root of Integer Binary Search
279 Power Function Square and Multiply
280 WoodCutting Made Easy Binary Search
281 Matrix Median Binary Search
282 Preorder to BST
283 Simple Queries Partially Incomplete Needs another Look
284 Count Element Occurence
285 Divide Integers Needs another Look Bit Manipulation
286 Single Number among thrice occuring numbers Bit Manipulation
287 Min XOR value
288 Stringoholics Needs another Look
289 Integer To Roman
290 Power of 2 Integer Division using strings
291 Minimum Characters required to make a String Palindromic Important
292 Pair With Given Difference
293 3 Sum Important Two Pointers
294 3 Sum Zero Lookup Table
295 Maximum Ones After Modification
296 Different Bits Sum Pairwise Bit Manipulation
297 Partition List
298 Insertion Sort List Linked List Insertion Sort
299 Sort List Linked List Merge Sort
300 Linked List Cycle
301 Reorder List
302 Sliding Window Maximum
303 MAXSPPROD Stack
304 Nearest Smaller Element
305 Largest Rectangle in Histogram Stack
306 Maximal String
307 Gray Code
308 Kth Permutation Sequence
309 Letter Phone
310 Palindrome Partitioning
311 Four Sum
312 Random Copy List Linked List Clone
313 Fraction Important Cycle Detection in Numbers
314 Subarray with given XOR Subarray XOR
315 Subarray with B odd numbers
316 Draw Circle Pattern
317 Non Repeating Numbers Important XOR Bit Manipulation
318 First n element XOR
319 Rearrange Groups in Linked List
320 Minimum Integer Points Required for Path Traversal
321 Points on the Straight Line
322 Longest Subarray Length Subarray
323 Subarray with equal occurences Subarray
324 Longest Increasing Decreasing Subsequence
325 Smallest sequence with given Primes
326 Repeating Sub-Sequence
327 Regular Expression Match (Asterix and Question Mark) Regex Matching Using DP Dynamic Programming
328 Maximum Product Subarray Subarray Two Pointers
329 Recover Binary Search Tree Incomplete Binary Search Tree Morris Tree Traversal
330 Unique Subsets
331 Count pairs in array divisible by K
332 Print Anagrams Together
333 Rotate Positive Matrix by 90 degree left Encoding Matrix
334 Swap Kth nodes from ends Linked List
335 Check if subtree Sub-tree Verification
336 BST Verification using Preorder Traversal Pre-order Traversal Binary Search Tree
337 Subset Sum Problem Subset Dynamic Programming
338 Count of subsets with sum equal to X Dynamic Programming
339 Robot at the Fair
340 Count Palindrome Sub-Strings of a String Dynamic Programming Strings
341 Boundary Traversal of binary tree
342 Huffman Encoding Priority Queue Python Custom Heapq Huffman Encoding
343 Total Decoding Messages
344 Target Sum Dynamic Programming
345 Number of Coins Dynamic Programming Unbounded Knapsack
346 Split Array With Same Average Incomplete Dynamic Programming
347 Thesaurus Dynamic Programming Permutations Math
348 Number of subsets with product less than k Partially Incomplete Dynamic Programming Meet in the Middle
349 Rod Cutting without fixed lengths Dynamic Programming Rod Cutting
350 Minimum Cost to Cut a Stick Dynamic Programming Rod Cutting
351 Largest BST Size
352 Magic Triplets Two Pointers
353 Magnet Array Problem Divide and Conquer
354 Water Overflow
355 Count number of substrings Needs Another Look Sliding Window
356 Clone a Binary Tree with Random Pointers
357 Occurences of 2 as a digit Needs Another Look Number Theory
358 Make Binary Tree From Linked List
359 Construct Tree from Preorder Traversal
360 Leaves to DLL
361 Add all greater values to every node in a BST
362 Stock span problem
363 Kumar and Zoo Needs Another Look
364 UW Connected Galaxies Needs Another Look Graphs
365 Majority Element Moore's Voting Algorithm
366 Copy Set Bits in Range Bit Manipulation
367 Longest Increasing Path in a Matrix
368 Maximum sum Rectangle Partially Incomplete Kadane Algorithm
369 Capacity To Ship Packages Within D Days Binary Search
370 Largest subsquare surrounded by X
371 Best Time to Buy and Sell Stock - Single Transactions
372 Best Time to Buy and Sell Stock II - Multiple Transactions
373 Best Time to Buy and Sell Stock III - At most 2 transactions
374 Best Time to Buy and Sell Stock IV - At most k transactions Important
375 Best Time to Buy and Sell Stock with Cooldown Needs another Look State Transitions
376 Best Time to Buy and Sell Stock with Transaction Fee State Transitions
377 Word Search
378 Beautiful Array Needs Another Look Important Math
379 Word Break
380 Maximum Intervals Overlap
381 Search in a row-column sorted Matrix
382 Count of sum of consecutives Math
383 Product Pair
384 Kill Captain America Incomplete Graph Topological Sort
385 Euler circuit and Path Graph
386 Linked List Polynomial Addition
387 Preorder traversal Binary Tree
388 Inorder Traversal Binary Tree
389 Postorder Traversal Binary Tree
390 Time in Heaven Incomplete
391 Minor DNAs Incomplete
392 Elections
393 H index Tree
394 Gas Station Array Greedy
395 Candy Distribution Array Greedy Dual Traversal
396 Trapping Rain Water 2D Array Matrix Graph
397 Text Justification String
398 Rotate Matrix by 90 degrees right Matrix Encoding
399 Tuple with Same Product Counting
400 Substring with Concatenation of All Words String Sliding Window
401 Separate Squares Binary Search
402 Reschedule Meetings for Maximum Free Time I
403 Meeting Scheduler
404 Reschedule Meetings for Maximum Free Time II
405 Coin Change II
406 Maximal Square matrix
407 Recover a Tree From Preorder Traversal
408 Design a Number Container System
409 Maximum Sum Subarray with negative numbers Incomplete Kandane
410 Number of Islands in 4 Direction
411 Clone Undirected Graph
412 Pacific Atlantic Water Flow matrix
413 Course Schedule II Graph
414 Course Schedule III Greedy
415 Graph Valid Tree Graph Sets Union Find
416 Number of Connected Components in an Undirected Graph Graph Union Find
417 Paths in Maze That Lead to Same Room Graph Count Fixed Length Cycles Set Intersection
418 Generate Parentheses
419 Count Number of Bad Pairs
420 Next Permutation
421 Product of the Last K Numbers Stream
422 Implement Trie (Prefix Tree) Trie
423 Word Search II Trie DFS Matrix
424 Merge Intervals Intervals
425 Minimize Connected Groups by Inserting Interval Intervals
426 Meeting Rooms Intervals
427 Meeting Rooms II Intervals
428 Meeting Rooms III Intervals
429 Nim Game Game Theory Math
430 Flip Game II Incomplete Game Theory Dynamic Programming Backtracking
431 Climbing Stairs Combinatorics Dynamic Programming Math
432 House Robber
433 House Robber II
434 House Robber III
435 House Robber IV Binary Search
436 Find Local Peak Element Binary Search
437 Find Minimum in Rotated Sorted Array Binary Search
438 Find First and Last Position of Element in Sorted Array Binary Search
439 Find K Closest Elements Binary Search
440 Closest Binary Search Tree Value
441 Search in a Sorted Array of Unknown Size Binary Search
442 Pow(x, n) Binary Search
443 Find Minimum in Rotated Sorted Array II Binary Search
444 Find the Duplicate Number Bit Manipulation
445 License Key Formatting
446 Fruit Into Baskets Sliding Window
447 Odd Even Jump Incomplete
448 Jump Game Sliding Window
449 Jump Game II Sliding Window
450 Jump Game III BFS
451 Jump Game VII Sliding Window Dynamic Programming
452 Jump Game VIII Dynamic Programming
453 Jump Game VI Dynamic Programming Heaps Dequeue
454 Jump Game IV Dynamic Programming BFS
455 Jump Game V DFS Dynamic Programming
456 Linked List Cycle II
457 Next Greater Element I
458 Next Greater Element II
459 Next Greater Element III
460 Moving Average from Data Stream
461 Binary Tree Vertical Order Traversal
462 Binary Tree Right Side View
463 Russian Doll Envelopes Longest Increasing Subsequence
464 Unique Length-3 Palindromic Subsequences
465 Reorganize String
466 Three Sum Closest
467 Single Element in a Sorted Array
468 Counting Bits Bit Patterns
469 Geek's Training
470 Unique Paths
471 Unique Paths II
472 Minimum Path Sum
473 Partition Array Into Two Arrays to Minimize Sum Difference Meet in the middle Subset Enumeration Bitmask Enumeration
474 Perfect Sum Problem Dynamic Programming
475 Partitions with Given Difference Dynamic Programming
476 Maximum Matching of Players With Trainers
477 Longest Palindromic Subsequence Dynamic Programming
478 Shortest Common Supersequence Word Dynamic Programming
479 Distinct Subsequences Dynamic Programming
480 Largest Divisible Subset Longest Increasing Subsequence
481 Longest String Chain Strings Longest Increasing Subsequence
482 Maximal Rectangle Area Matrix
483 Count Square Submatrices with All Ones Matrix
484 Palindrome Partitioning II Strings
485 Interleaving String Dynamic Programming Strings
486 Queue Reconstruction by Height Needs another look
487 Next Smallest Palindrome Pattern Recognition
488 Split Array Largest Sum Binary Search
489 N/3 Repeat Number Counting Voting Array
490 Remove K Digits Monotonic Stack
491 Create Maximum Number Greedy Monotonic Stack
492 Stream of Characters Trie
493 Group Anagrams
494 Binary Tree Maximum Path Sum
495 Zero Array Transformation I New Perspective Array Prefix Sum
496 Zero Array Transformation II Array Prefix Sum Binary Search
497 Move Pieces to Obtain a String Partially Complete Strings
498 Identify the Largest Outlier in an Array
499 Count Special Subsequences
500 Random Pick with Weight Random Binary Search Prefix Sum
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550