0% found this document useful (0 votes)
43 views24 pages

DSA Sheet

Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1/ 24

SI NO PROBLEM STATEMENT

SORTING ALGORITHMS { DONE }


1 Selection Sort
2 BubbleSort
3 Insertion Sort
4 Merge Sort
5 Quick Sort
ARRAY + BINARY SEARCH EASY 26Q -> 10 Days { DONE }
6 Largest Element in an Array
7 Second Largest Element in an Array
8 Check if the array is sorted
9 Remove duplicates from Sorted array
10 Left Rotate an array by one place
11 Left rotate an array by D places
12 Move Zeros to end
13 Linear Search
14 Find the Union
15 Find missing number in an array
16 Maximum Consecutive Ones
17 Find the number that appears once
18 Longest subarray with given sum K
19 Binary Search to find X in sorted array
20 Implement Lower Bound
21 Implement Upper Bound
22 Search Insert Position
23 Floor/Ceil in Sorted Array
24 Find the first or last occurrence of an element
25 Count occurrences of a number in an array
26 Search in Rotated Sorted Array I
27 Search in Rotated Sorted Array II
28 Find minimum in Rotated Sorted Array
29 Find out how many times has an array been rotated
30 Single element in a Sorted Array
31 Find peak element
TOPIC : Matrix 13 Q -> 5 Days { DONE }
32 Search a 2D Matrix
33 Search in a row-column sorted Matrix
34 Sorted matrix
35 Common Elements Present In All Rows Of Matrix
36 Row with max 1s
37 Rotate Image
38 Spiral Matrix
39 Set Matrix Zeroes
40 Find a Peak Element II
41 Kth element in Matrix
42 Median in a row-wise sorted Matrix
43 Count Negative Numbers in a Sorted Matrix
44 Find Minimum in Rotated Sorted Array II
TOPIC : Array + Binary Search (Medium + Hard) 37Q -> 14 Days
45 2 Sum Problem
46 Sort an array of 0's 1's and 2's
47 Majority Element (>n/2 times)
48 Kadane's Algorithm
49 Print subarray with maximum subarray Sum
50 Stock Buy and Sell
51 Rearrange Array Elements by Sign
52 Next Permutation
53 Leaders in an Array problem
54 Longest Consecutive Sequence
55 Count subarrays with given sum
56 Pascal's Triangle
57 Majority Element (n/3 times)
58 3-Sum Problem
59 4-Sum Problem
60 Largest Subarray with 0 Sum
61 Count the number of subarrays with given xor K
62 Merge Overlapping Subintervals
63 Merge two Sorted Arrays Without Extra Space
64 Find the repeating and missing numbers
65 Count Inversions
66 Reverse Pairs
67 Maximum Product Subarray
68 Finding Sqrt of a number
69 Nth Root of a Number
70 Koko Eating Bananas
71 Minimum days to make M bouquets
72 Find the smallest Divisor
73 Capacity to Ship Packages within D Days
74 Kth Missing Positive Number
75 Aggressive Cows
76 Book Allocation Problem
77 Split array - Largest Sum
78 Painter's partition
79 Minimise Maximum Distance between Gas Stations
80 Median of 2 sorted arrays
81 Kth element of 2 sorted arrays
TOPIC : Stack & Queue 46Q -> 14 Days
82 Stack Implementation Using Array
83 Implement Stack With Linked List
84 Implement Queue using Arrays
85 Implement Queue Using Linked List
86 Stack using queue
87 Queue using stack
88 Implement two stacks in an array
89 Delete middle element of a stack
90 Design Circular Queue
91 Deque Implementations
92 Operations on PriorityQueue
93 Min Stack
94 Valid Parentheses
95 Infix To Postfix Conversion
96 Prefix to Infix Conversion
97 Prefix to Postfix Conversion
98 PostFix To Prefix Conversion
99 Postfix to Infix Conversion
100 Infix To Postfix Conversion
101 Next Greater Element I
102 Next Greater Element II
103 Nearest Smaller Element
104 Count Of Greater Elements To The Right
105 Special Stack
106 Evaluation of Postfix Expression
107 Insert an Element at the Bottom of a Stack
108 Reverse a Stack
109 Reverse a string using Stack
110 Sort a stack
111 Queue Reversal
112 N Stacks In An Array
113 N Queue Using Array
114 Trapping Rain Water
115 Sum of Subarray Minimums
116 Asteroid Collision
117 Sum of Subarray Ranges
118 Remove K Digits
119 Largest Rectangle in Histogram
120 Maximal Rectangle
121 Sliding Window Maximum
122 Online Stock Span
123 The Celebrity Problem
124 LRU Cache
125 LFU Cache
126 Remove Invalid Parentheses
127 Interleave the First Half of the Queue with Second Half
TOPIC : Recursion 39Q - 14 Days
128 Learn Theory
129 Print 1 to N using recursion
130 Print name N times using recursion
131 Print N to 1 using recursion
132 Sum Of First N Numbers
133 Factorial of N numbers
134 Reverse an array Using Recursion
135 Check if the given String is Palindrome or not Using Recursion
136 Fibonacci Number
137 Recursive Implementation of atoi()
138 Pow(x, n)
139 Count Good numbers
140 Generate all binary strings
141 Generate Paranthesis
142 Subsets
143 More subsequence
144 Check if there exists a subsequence with sum K
145 Subarrays with Sum ‘k'
146 Combination Sum
147 Combination Sum II
148 Subset Sum-I
149 Subset Sum-II
150 Combination Sum - III
151 Letter Combinations of a Phone Number
152 Palindrome Partitioning
153 Word Search
154 N-Queens
155 Rat in a Maze Problem
156 Word Break
157 M-Coloring Problem
158 Sudoku Solver
159 Expression Add Operators
160 Remove Invalid Parentheses
161 Palindrome Partitioning II
162 Check Knight Tour Configuration
163 Permutations
164 Permutation in String
165 Permutations II
166 Permutation Sequence
TOPIC : Linked List 45Q -> 14 Days
167 Construction of Linked List
168 Linked List Insertion
169 Delete Node in a Linked List
170 Count nodes of linked list
171 Search in Linked List
172 Implementation to Circular Linked List
173 Implementation to Doubly Circular Linked List
174 Middle of the Linked List
175 Delete the Middle Node of a Linked List
176 Reverse Linked List [Iterative + Recursive]
177 Palindrome Linked List
178 Detect Linked List Cycle
179 Find the first node of loop in linked list
180 Find length of Loop
181 Remove loop in Linked List
182 Sort List
183 Sort linked list of 0s 1s 2s
184 Odd Even Linked List
185 Remove Nth Node From End of List
186 Intersection of Two Linked Lists
187 Add 1 to a number represented as linked list
188 Add two numbers represented by linked lists
189 Implementation to Doubly Linked List
190 Doubly linked list Insertion at given position
191 Delete node in Doubly Linked List
192 Reverse a Doubly Linked List
193 Delete all occurrences of a given key in a doubly linked list
194 Find pairs with given sum in doubly linked list
195 Remove Duplicates from Sorted List
196 Remove duplicates from an unsorted linked list
197 Remove duplicates from a sorted doubly linked list
198 Rotate List
199 Flattening a Linked List
200 Flatten a Multilevel Doubly Linked List
201 Copy List with Random Pointer
202 Reverse Nodes in Even Length Groups
203 Reverse Linked List II
204 Reverse Nodes in k-Group
205 Sort a k sorted doubly linked list
206 Quick Sort on Linked List
207 Split a Circular Linked List into two halves
208 Delete nodes having greater value on right
209 Multiply two linked lists
210 Reverse DLL nodes in groups
211 Rotate Doubly linked list by N nodes
TOPIC : Binary Tree 36Q -> 14 Days
212 Learn Theory
213 Create Binary Tree
214 Tree Traversals BFS/DFS
215 Binary Tree Preorder Traversal
216 Binary Tree Inorder Traversal
217 Binary Tree Postorder Traversal
218 Binary Tree Preorder Traversal Iterative
219 Binary Tree Inorder Traversal Iterative
220 Binary Tree Postorder Traversal Iterative
221 Binary Tree Level Order Traversal
222 Binary Tree Height
223 Balanced Binary Tree
224 Diameter of Binary Tree
225 Determine if Two Trees are Identical
226 Zig Zag Traversal of Binary Tree
227 Boundary Traversal of Binary Tree
228 Vertical Order Traversal of a Binary Tree
229 Top View of Binary Tree
230 Bottom View of Binary Tree
231 Left View of Binary Tree
232 Binary Tree Right Side View
233 Symmetric Tree
234 Root to Leaf Paths
235 Lowest Common Ancestor of a Binary Tree
236 Maximum Width of Binary Tree
237 Children Sum Property
238 All Nodes Distance K in Binary Tree
239 Burning Tree
240 Count Number of Nodes in a Binary Tree
241 Unique Binary Tree Requirements
242 Construct Binary Tree from Preorder and Inorder Traversal
243 Construct Binary Tree from Inorder and Postorder Traversal
244 Serialize and Deserialize Binary Tree
245 Morris Preorder Traversal
246 Morris Inorder Traversal
247 Flatten Binary Tree to Linked List
TOPIC : Binary Search Tree 19Q -> 7 Days
248 Introduction to Binary Search Tree
249 Search in a Binary Search Tree
250 Find Min/Max in BST
251 Ceil in a Binary Search Tree
252 Floor in a Binary Search Tree
253 Insert a given Node in BST
254 Delete a Node in Binary Search Tree
255 Kth Smallest Element in a BST
256 Kth largest element in BST
257 Validate Binary Search Tree
258 Lowest Common Ancestor of a Binary Search Tree
259 Construct Binary Search Tree from Preorder Traversal
260 Construct BST from Postorder
261 Predecessor and Successor in BST
262 Merge two BST 's
263 Merge n BSTs to Create Single BST
264 Find a pair with given target in BST
265 Fixing Two nodes of a BST
266 Largest BST in Binary Tree
TOPIC : Heap 20 Q -> 10 Days
267 Implement a priority queue
268 Min Heap Implementation
269 Check if a Given Array Represents a Binary Heap
270 Convert Min Heap To Max Heap
271 Kth largest element in an array
272 Kth smallest element
273 Sort K sorted array
274 Merge k Sorted Lists
275 Replace Each Element Of Array With Its Corresponding Rank
276 Task Scheduler
277 Hand of Straights
278 Design Twitter
279 Minimum Cost of ropes
280 Kth Largest Element in a Stream
281 Maximum Sum Combination
282 Find Median from Data Stream
283 Top K Frequent Elements
284 Convert BST to Min Heap
285 Heap Sort
286 Merge two binary Max heaps
TOPIC : Trie 9Q -> 5 Days
287 Learn Theory
288 Implement Trie (Prefix Tree)
289 Implement Trie ll
290 Longest common prefix
291 Count Distinct Substrings
292 Bitwise Basic Operations
293 Maximum XOR of Two Numbers in an Array
294 Maximum XOR With an Element From Array
295 Implement a phone directory
TOPIC : Greedy Algorithms 13Q -> 7 Days
296 Assign Cookies
297 Fractional Knapsack Problem
298 Greedy algorithm to find minimum number of Coins
299 Lemonade Change
300 Valid Paranthesis Checker
301 N meetings in one room
302 Jump Game
303 Jump Game 2
304 Job sequencing Problem
305 Candy
306 Insert Interval
307 Merge Intervals
308 Non-overlapping Intervals
TOPIC : NUMBERS
1. Check if a number is palindrome or not
2. Find all Palindrome numbers in a given range
3. Check if a number is prime or not
4. Prime numbers in a given range
5. Check if a number is armstrong number of not
6. Check if a number is perfect number
7. Even or Odd
8. Check weather a given number is positive or negative
9. Sum of first N natural numbers
10. Find Sum of AP Series
11. Program to find sum of GP Series
12. Greatest of two numbers
13. Greatest of three numbers
14. Leap Year or not
15. Reverse digits of a number
16. Maximum and Minimum digit in a number
17. Print Fibonacci upto Nth Term
18. Factorial of a number
19. Power of a number
20. Factors of a given number
21. Print all prime factors of the given number
22. Check if a number is a strong number or not
23. Check if a Number is Automorphic
24. GCD of two numbers
25. LCM of two numbers
26. Check if a number is Harshad number
27. Check if the number is abundant number or not
28. Sum of digits of a number
29. Sum of numbers in the given range
30. Permutations in which N people can occupy R seats in a classroom
31. Program to add two fractions
32. Replace all 0s with 1s in a given integer
33. Can a number be expressed as a sum of two prime numbers
34. Calculate the area of circle
35. Program to find roots of a Quadratic Equation
TOPIC : NUMBER SYSTEM
1. Convert Binary to Decimal
2. Convert binary to octal
3. Decimal to Binary conversion
4. Convert decimal to octal
5. Convert octal to binary
6. Convert octal to decimal
7. Convert digits/numbers to words
LeetCode GFG NINJA DATE REVISION
MS { DONE }
GFG Ö R
GFG Ö R
GFG Ö R
GFG Ö R
GFG Ö R
26Q -> 10 Days { DONE }
Ö
Ö R
Ö
Ö R
Ö
Ö R
Ö R
Ö
Ö
Ö R
Ö R
Ö

Ö
Ö R
Ö R
Ö
Ö R
Ö
Ö R
Ö R
Ö R
Ö R
Ö
Ö R
GFG2 Ö R
Days { DONE }
Link1 Ö R
Link1 Link 2 Ö R
Article Link 2 Ö
Link 3 Ö R
Link1 Link 2 Ö R
Link1 Link 2 Ö
Link1 Link 2 Ö R
Link1 Link 2 Ö R
Link1 X R
Link1 Link 2 Ö R
Link 2 Ö R
Link1 Ö R
Link1 X R
ium + Hard) 37Q -> 14 Days
Link 1 Link 2 1 X
Link 1 Link 2 2 X
Link 1 Link 2 3 X
Link 1 Link 2 4 X
Link 2 5 X
Link 1 Link 2 6 X
Link 1 Link 2 7 X
Link 1 Link 2 8 X
Link 1 Link 2 9 X
Link 1 Link 2 10 X
Link 1 Link 2 11 X
Link 1 Link 2 12 X
Link 1 Link 2 13 X
Link 1 Link 2 14 X
Link 1 Link 2 15 X
Link 1 Link 2 16 X
Link 3 17 X
Link 1 Link 2 18 X
Link 1 Link 2 19 X
Link 2 20 X
Link 2 21 X
Link 1 Link 2 22 X
Link 1 Link 2 23 X
Link 1 Link 2 24 X
Link 1 Link 2 25 X
Link 1 Link 2 26 X
Link 1 Link 2 27 X
Link 1 Link 2 28 X
Link 1 Link 2 29 X
Link 1 Link 2 30 X
Link 1 Link 2 31 X
Link 2 Link 3 32 X
Link 1 Link 2 33 X
Link 2 Link 3 34 X
Link 2 Link 3 35 X
Link 1 Link 2 36 X
Link 2 Link 3 37 X
46Q -> 14 Days
Link 2 Link 3 1 X
Article Link 3 2 X
Link 2 Link 3 3 X
Link 2 Link 3 4 X
Link1 Link 2 5 X
Link1 Link 2 6 X
Link1 Link 2 7 X
Link 2 Link3 8 X
Link 1 Link 2 9 X
Link 2 10 X
Link 2 11 X
Link 1 Link 2 12 X
Link 1 Link 2 13 X
Link 2 Link 3 14 X
Link 2 Link 3 15 X
Link 2 Link 3 16 X
Link 2 Link 3 17 X
Link 2 18 X
Article 19 X
Link 1 Link 2 20 X
Link 1 Link 2 21 X
Link 1 Link 2 22 X
Link 1 Link 2 23 X
Link 2 24 X
Link 1 Link 2 25 X
Link 1 Link 2 26 X
Link 2 Link 3 27 X
Link 1 Link 2 28 X
Link 2 Link 3 29 X
Link 2 30 X
Link 3 31 X
Link 3 32 X
Link 1 Link 2 33 X
Link 1 Link 2 34 X
Link 1 Link 2 35 X
Link 1 Link 2 36 X
Link 1 Link 2 37 X
Link 1 Link 2 38 X
Link 1 Link 2 39 X
Link 1 Link 2 40 X
Link 1 Link 2 41 X
Link 2 42 X
Link 1 Link 2 43 X
Link 1 Link 2 44 X
Link 1 Link 2 45 X
Link 2 46 X
9Q - 14 Days
Article Ö
Link 2 Link 3 Ö
Link 2 Link 3 Ö
Link 2 Link 3 Ö
Link 2 Link 3 Ö
Link 2 Link 3 Ö
Link 1 Link 3 Ö
Link 1 Link 2 Link 3 Ö
Link 1 Link 2 Link 3 Ö
Link 1 Link 2 Peak Recu Ö R
Link 1 Link 2 Ö R
Link 1 Link 2 Ö
Link 2 Ö
Link 1 Link 2 Ö
Link 1 Link 2 Ö
Link 3 X
Link 2 Ö
Link 1 Link 2 Link 3 X
Link 1 Link 2 Ö
Link 1 Link 2 Ö
Link 1 Link 2 Link 3 Ö
Link 1 Link 2 Ö
Link 1 Link 2 Ö
Link 1 Link 2 Ö
Link 1 Link 2 Ö
Link 1 Link 2 Ö
Link 1 Link 2 Ö
Link 1 Link 2 Ö
Link 1 Link 2 DP X
Link 1 Link 2 X
Link 1 Link 2 X
Link 1 Link 2 X
Link 1 Link 2 X
Link 1 Link 2 DP X
Link 1 Link 2 Ö
Link 1 Link 2 Ö
Link 1 X
Link 1 Link 2 X
Link 1 Link 2 X
5Q -> 14 Days
Link 2 Ö
Link 2 Ö
Link1 Link 2 Ö
Link 2 Ö
Link 2 Ö
Article X
Article X
Link1 Link 2 Ö
Link1 Link 2 Ö
Link1 Link 2 X
Link1 Link 2 X
Link 1 Link 2 X
Link 1 Link 2 X
Link 2 X
Link 2 X
Link 1 Link 2 X
Link 2 X
Link 1 Link 2 X
Link 1 Link 2 X
Link 1 Link 2 X
Link 2 X
Link 1 Link 2 X
X
Link 2 X
Link 2 X
Link 2 X
Link 2 X
Link 2 X
Link 1 Link 2 X
Link 1 Link 2 X
Link 2 X
Link 1 Link 2 X
Link 2 X
Link 1 X
Link 1 Link 2 X
Article X
Link 1 Link 2 X
Link 1 Link 2 X
Link 2 X
Link 2 X
Link 1 Link 2 X
Link 1 Link 2 X
Link 2 X
Link 2 X
Link 3 X
6Q -> 14 Days
Link 3
Link 2 Link 3
Link 3
Link 1 Link 2
Link 1 Link 2
Link 1 Link 2
Link 1 Link 2
Link 1 Link 2
Link 1 Link 2
Link 1 Link 2
Link 1 Link 2
Link 1 Link 2
Link 1 Link 2
Link 1 Link 2
Link 1 Link 2
Link 2
Link 1 Link 2
Link 2
Link 2
Link 2
Link 1 Link 2
Link 1 Link 2
Link 1 Link 2
Link 1 Link 2
Link 1 Link 2
Link 1 Link 2 Link 3
Link 1 Link 2
Link 1 Link 2
Link 1
Link 2 Link 3
Link 1 Link 2
Link 1 Link 2
Link 1 Link 2
Link 1
Link 1
Link 1 Link 2
ee 19Q -> 7 Days
Link 3 X
Link 1 Link 2 X
Link 2 X
Link 2 X
Link 2 X
Link 1 Link 2 X
Link 1 Link 2 X
Link 1 Link 2 X
Link 2 X
Link 1 Link 2 X
Link 1 Link 2 X
Link 1 X
Link 2 X
Link 2 X
Link 2 X
Link 1 X
Link 1 Link 2 X
Link 1 Link 2 X
Link 2 X
-> 10 Days
Link 3 1 X
Link 2 Link 3 2 X
Link 2 Link 3 3 X
Link 2 Link 3 4 X
Link 1 Link 2 5 X
Link 1 Link 2 6 X
Link 2 Link 3 7 X
Link 1 Link 2 8 X
Link 1 Link 2 9 X
Link 1 Link 2 10 X
Link 1 Link 2 11 X
Link 1 Link 2 12 X
Link 2 Link 3 13 X
Link 1 Link 2 14 X
Link 2 Link 3 15 X
Link 1 Link 2 16 X
Link 1 Link 2 17 X
Link 1 Link 2 18 X
Link 1 Link 2 19 X
Link 1 Link 2 20 X
> 5 Days
Link 3 1 X
Link 1 Link 2 2 X
Link 2 Link 3 3 X
Link 1 Link 2 Link 3 4 X
Link 2 Link 3 5 X
Link 3 6 X
Link 1 Link 2 7 X
Link 1 Link 2 8 X
Link 2 Link 3 9 X
ms 13Q -> 7 Days
Link 1 1 X
Link 2 2 X
Link 2 3 X
Link 1 4 X
Link 1 5 X
Link 2 6 X
Link 1 7 X
Link 1 8 X
Link 2 9 X
Link 1 10 X
Link 1 11 X
Link 1 12 X
Link 1 13 X
UMBERS
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
1
Ö
2
Ö
3
Ö
Ö
Ö
Ö
Ö
Ö
Ö
Ö
4
5 Ö
Ö
6
Ö
7
BER SYSTEM
Ö
Ö
Ö
Ö
Ö
Ö

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy