Complete DSA Preparation Course
β my DSA repo so you can keep up to date on any daily progress!
Make sure to LeetCode | GeeksforGeeks
If you like this project, please leave me a star. β
A little Contribution
dsa-course@upi
"For coding interview preparation, LeetCode & GeeksforGeeks is one of the best online resource providing a rich library of more than 500+ real coding interview questions for you "
Table of Contents
- Time Complexity
- Mathematics
- Bits Manipulation
- Recursion
- Arrays
- Searching
- Sorting
- Matrix
- Hashing
- String
- Linked List
- Stack
- Queue
- Tree
- Binary Search Tree
- Heap
- Graph
- Greedy
- Backtracking
- Dynamic Programming
- Trie
Mathematics
# | Title | Code | Document | Video | Difficulty | Tag |
---|---|---|---|---|---|---|
1 | Absolute value | Theory | abs() | |||
2 | Celsius To Fahrenheit | Theory | Math | |||
3 | Roots of Quadratic equation | Theory | Math | |||
4 | Factorial Of Number | Math | ||||
5 | Count digits in a factorial | Factorial, Math | ||||
6 | Series GP | Basic Math | ||||
7 | Prime Number | Basic Math | ||||
8 | Exactly 3 Divisors | Theory | Basic Math | |||
9 | Addition Under Modulo | Theory | Modulo | |||
10 | Multiplication Under Modulo | Theory | Modulo | |||
11 | Modular Multiplicative Inverse | Modulo | ||||
12 | Trailing zeroes in factorial | Logic | ||||
13 | Prime Factors | Prime |
Bits Manipulation
# | Title | Code | Document | Video | Difficulty | Tag |
---|---|---|---|---|---|---|
1 | Find first set bit | Bits, Modulo | ||||
2 | Rightmost different bit | XOR, Modulo | ||||
3 | Check whether K-th bit is set or not | XOR, Modulo | ||||
4 | Count total set bits | RIght shift | ||||
5 | Bit Difference | Bits | ||||
6 | Number is sparse or not | Bits | ||||
7 | Longest Consecutive 1's | Bits | ||||
8 | Gray Code | Xor, Right Shift | ||||
9 | Gray to Binary equivalent | Xor, Right Shift | ||||
10 | Power of 2 | AND | ||||
11 | Swap all odd and even bits | OR | ||||
12 | Maximum AND Value | AND |
Recursion
# | Title | Code | Document | Video | Difficulty | Tag |
---|---|---|---|---|---|---|
1 | Print 1 to n without using loops | Recursion | ||||
2 | Sum Of Digits | Recursion | ||||
3 | Count Total Digits in a Number | Recursion | ||||
4 | Digital Root | Recursion | ||||
5 | Fibonacci Using Recursion | Recursion | ||||
6 | Tower Of Hanoi | Recursion | ||||
7 | Josephus problem | Recursion |
Arrays
# | Title | Code | Document | Video | Difficulty | Tag |
---|---|---|---|---|---|---|
1 |
Searching
# | Title | Code | Document | Video | Difficulty | Tag |
---|---|---|---|---|---|---|
1 |
Sorting
# | Title | Code | Document | Video | Difficulty | Tag |
---|---|---|---|---|---|---|
1 |
Matrix
# | Title | Code | Document | Video | Difficulty | Tag |
---|---|---|---|---|---|---|
1 | What is Multidimensional Arrays c++ | Video | Matrix, Array | |||
2 | Sum of upper and lower triangles | Solution | Matrix, Array | |||
3 | Transpose of Matrix | Solution | Matrix, Array | |||
4 | Rotate by 90 degree | Solution | Matrix, Array | |||
5 | Multiply the matrices | c++ | Solution | Matrix, Array | ||
6 | Spirally traversing a matrix | c++ | Solution | Matrix, Array | ||
7 | Interchanging the rows of a Matrix | c++ | Solution | Matrix, Array | ||
8 | Matrix Interchange | Practice | Matrix, Array | |||
9 | Search in a row-column sorted Matrix | c++ | Solution | Matrix, Array | ||
10 | Boolean Matrix | c++ | Solution | Matrix, Array |
Hashing
# | Title | Code | Document | Video | Difficulty | Tag |
---|---|---|---|---|---|---|
1 | What is Hashing Data structure | Theory | Hashing | |||
2 | Code of Hashing in c++ | c++ | Solution | Hashing | ||
3 | Direct Access Table | Theory | Hash | |||
4 | What is Hash Function and collision | Theory | Hash | |||
5 | What is chaining in collision handling | Theory | Hashing | |||
6 | What is unordered_set | c++ | Theory | Hash | ||
7 | What is unordered_map | c++ | GFG | Theory | Hash | |
8 | Non Repeating Element | c++ | Solution | Hashing | ||
9 | First Repeating Element | c++ | Solution | Hashing | ||
10 | Union of two arrays | Practice | Hashing | |||
11 | Intersection of Two Arrays | c++ | Solution | unordered_set | ||
12 | Key Pair | c++ | Solution | unordered_map | ||
13 | Subarray with sum 0 | c++ | Solution | unordered_set | ||
14 | Winner of an election | c++ | Solution | unordered_map | ||
15 | Pairs with Positive Negative values | c++ | Solution | map, Vector | ||
16 | Print Anagrams Together / Group Anagrams | c++ | Solution | unordered_map, string | ||
17 | Relative Sort Array / Sort an array according to the other | c++ | Solution | Map | ||
18 | Custom Sort String | c++ | Solution | map | ||
19 | Sort Array by Increasing Frequency | c++ | Solution | map, Lambda | ||
20 | Longest Consecutive Sequence | Practice | map |
String
Linked List
# | Title | Code | Document | Video | Difficulty | Tag |
---|---|---|---|---|---|---|
1 | Introduction to Linked list Playlist c++ | Theory | Linked List | |||
2 | Data structures Competitive Programming | Theory | DSA | |||
3 | Arrays in Data Structures | Theory | Arrays | |||
4 | Pointers in C++ with code Practice | Theory | Pointers | |||
5 | Struct in c++ | Theory | Struct |
Stack
# | Title | Code | Document | Video | Difficulty | Tag |
---|---|---|---|---|---|---|
1 | What is stack | GFG Link | Solution | Stack, Array | ||
2 | Implement stack using array | Stack, Array | ||||
3 | Implement Stack using Linked List | Stack, Linked List | ||||
4 | Implement Stack using Linked List | Stack, Linked List | ||||
5 | Remove All Adjacent Duplicates In String | Stack, string | ||||
6 | Remove All Adjacent Duplicates in String II | Stack, string | ||||
7 | Valid Parentheses | Stack, string | ||||
8 | Implement two stacks in an array | Stack, Array | ||||
9 | Valid Parentheses | Stack, string | ||||
10 | Get min at pop | Stack, Array | ||||
11 | Min Stack | Stack, Array | ||||
12 | Delete middle element of a stack | Stack, STL | ||||
13 | Infix to Postfix | Stack | ||||
14 | Evaluate Reverse Polish Notation | Stack, Evaluation of Postfix Expression | ||||
15 | Online Stock Span | Stack, Stock span problem | ||||
16 | Next Greater Element II | Stack, Array | ||||
17 | Largest Rectangle in Histogram | Stack, Array | ||||
18 | The Celebrity Problem | Stack, Array |
Queue
# | Title | Code | Document | Video | Difficulty | Tag |
---|---|---|---|---|---|---|
1 | What is Queue | GFG Link | Solution | Queue, STL | ||
2 | Implement Queue using array | Queue, Array | ||||
3 | Implement Queue using Linked List | Scaler Topics Link | Queue, Linked List | |||
4 | Queue Reversal | Queue, Stack | ||||
5 | Queue using two Stacks | Queue, Stack | ||||
6 | Implement Queue using Stacks | Stack, Queue | ||||
7 | Stack using two queues | Stack, Queue | ||||
8 | Generate Binary Numbers | Queue | ||||
9 | Reverse First K elements of Queue | Queue, Stack | ||||
10 | Circular tour | Queue, Sliding window |
Tree
# | Question | Code | Document | Video | Difficulty | Tag |
---|---|---|---|---|---|---|
1 | What is Tree | Solution1, solution2 | Tree, Theory | |||
2 | What is Binary tree | solution | Tree, Binary Tree | |||
3 | How to code binary tree | c++ | Solution | Tree, Code | ||
4 | Properties of Binary tree | solution | Tree, Node | |||
5 | Types of Binary tree | solution | Binary Tree | |||
6 | Tree Traversal | solution1, solution2 | Traversal, Inorder | |||
7 | Code of Inorder Traversal | c++ | solution | Inorder Traversal | ||
8 | Code of Preorder and Postorder | c++ | Solution | Preorder, Postorder | ||
9 | Binary Tree Inorder Traversal | c++ | Solution | Recursion, Tree | ||
10 | Binary Tree Preorder Traversal | Practice | Recursion, Tree | |||
11 | Binary Tree Postorder Traversal | Practice | Recursion, Tree | |||
12 | Same Tree | c++ | Solution | Tree Traversal | ||
13 | Maximum Depth of Binary Tree | c++ | Solution | Recursion, Tree | ||
14 | Children Sum Parent | c++ | Solution | Recursion, Tree | ||
15 | Binary Tree Level Order Traversal | c++ | Solution | Queue, Tree | ||
16 | Level order traversal Line by Line | Practice | stack, Tree | |||
17 | Binary Tree Zigzag Level Order Traversal | c++ | Solution | Queue, Tree | ||
18 | Maximum Width of Tree | Tree | ||||
19 | Balanced Binary Tree | c++ | Solution | Tree | ||
20 | Left View of Binary Tree | Tree | ||||
21 | Right View of Binary Tree | Tree | ||||
22 | Lowest Common Ancestor in a Binary Tree | Tree | ||||
23 | Diameter of Binary Tree | Tree | ||||
24 | Vertical Width of a Binary Tree | Tree | ||||
25 | Mirror Tree | Tree | ||||
26 | Check if subtree | Tree | ||||
27 | Make Binary Tree From Linked List | Tree |
Binary Search Tree
# | Title | Code | Document | Video | Difficulty | Tag |
---|---|---|---|---|---|---|
1 | Inorder traversal of a BST | BST, Tree | ||||
2 | Search in a Binary Search Tree | BST, Tree |
Heap
# | Title | Code | Document | Video | Difficulty | Tag |
---|---|---|---|---|---|---|
1 | Heap sort | Solution | Heap Basic | |||
2 | Kth Largest Element in an Array | Solution | Heap Basic | |||
3 | Kth Largest Element in a Stream | Solution | Heap Basic | |||
4 | Top K Frequent Elements | Solution | Heap Basic | |||
5 | Minimum Cost of ropes | Solution | Heap Basic | |||
6 | Find K Closest Elements | Solution | Heap Medium | |||
7 | Merge k Sorted Arrays | Solution | Heap Medium | |||
8 | Find median in a stream | Solution | Heap Hard |
Graph
# | Title | Code | Document | Video | Difficulty | Tag |
---|---|---|---|---|---|---|
1 | Graph Introduction | Solution | Graph Theory | |||
2 | Adjacency Matrix in graph | Solution | Graph Basic | |||
3 | Adjacency List in graph | Solution | Graph | |||
4 | How to code graph | Solution | Graph | |||
5 | BFS Of Graph | Solution | Graph Theory | |||
6 | Find If Path Exists in Graph | C++ | Solution | Graph BFS | ||
7 | Find the Town Judge | C++ | Solution | Graph BFS | ||
8 | DFS Of Graph | Solution | Graph Theory | |||
9 | Number of Islands | C++ | Solution | Graph DFS | ||
10 | Flood Fill | C++ | Solution | Graph Theory | ||
11 | Detect cycle in undirected graph | Solution | Graph | |||
12 | Topological sort (Kahn's BFS) | C++ | Solution | Graph | ||
13 | Topological sort using DFS | C++ | Solution | Graph DFS | ||
14 | Detect Cycle in a Directed Graph | C++ | Solution | Graph GFG |
Greedy
# | Title | Code | Document | Video | Difficulty | Tag |
---|---|---|---|---|---|---|
1 |
Backtracking
# | Title | Code | Document | Video | Difficulty | Tag |
---|---|---|---|---|---|---|
1 |
Dynamic Programming
# | Title | Code | Document | Video | Difficulty | Tag |
---|---|---|---|---|---|---|
1 | Fibonacci Numbers - Top Down DP | Recursion |
Trie
# | Title | Code | Document | Video | Difficulty | Tag |
---|---|---|---|---|---|---|
1 | Insert and Search | Trie |
π Β License
The Whole content management system is released under the under terms of the MIT License.
Connect with us ~Prince
Do star, fork and share the repo to show your support, it would help others too!
Let me know your views on the repository or any changes or improvements at LinkedIn, Telegram