Master DSA Using GFG and Leetcode - Sheet1
Master DSA Using GFG and Leetcode - Sheet1
This roadmap will be frequently updated, so make sure to keep checking it. View the sheet2 for advance DSA topics.
To duplicate the roadmap, simply navigate to Google Sheets and select "File" > "Make a Copy" from the menu.
1.4 Hashing
Pending [Pre Requirement] How to store frequency Theory [Watch the Video] https://youtu.be/Ocd_uHpsQyg
Pending Learn basics of hashing Theory [Watch the Video] https://youtu.be/0IE5T63qEHg
Pending Find the Frequency Find the Frequency | Practice | GeeksforGeeks (Do on your own) -
Pending Count Frequency in a range Frequencies of Limited Range Array Elements | Practice | GeeksforGeeks (Do on your own) -
3. Problems on Arrays
3.1 EASY
Pending Largest Element in an Array Largest Element in Array | Practice | GeeksforGeeks https://youtu.be/H52p90uVUGA Find the Largest Element in an Array (Brute Force & Optimal Solutions) | Step-by-Step with Images
Pending Second Largest Element in an Array without sorting Second Largest Number - Naukri Code 360 https://youtu.be/Z6TwNJJ9OoQ Find the second largest and second smallest element in an Array | Explained
Pending Check if the array is sorted Check if array is sorted | Practice | GeeksforGeeks https://youtu.be/_T4Tr2Y6yd4 Check if array is sorted | Explained using Python Code
Pending Remove duplicates from Sorted array Remove Duplicates from Sorted Array - LeetCode https://youtu.be/a2gP9uYrpQo Remove duplicates from Sorted array – Leetcode 26
Pending Right Rotate an array by one place Theory [Watch the Video] https://youtu.be/_EHlC6xhhE0 -
Pending Right rotate an array by K places Rotate Array - LeetCode https://youtu.be/HRzQK5TkrZM Right Rotate an Array by K places | Explained with Examples
Pending Move Zeros to end Move Zeroes - LeetCode https://youtu.be/GtssSuFh_Ek Move Zeroes | Leetcode 283 | Explained
Pending Linear Search Array Search | Practice | GeeksforGeeks https://youtu.be/mjjj1UK0Z1E Linear Search | Explained in Python
Pending Merge 2 sorted Arrays Union of Two Sorted Arrays | Practice | GeeksforGeeks https://youtu.be/d9Rpk0j9ofs Union of 2 Sorted with Duplicates | Explained with Images
Pending Find missing number in an array Missing Number - LeetCode https://youtu.be/Zo1d2EqX45U Missing Number | Leetcode 268 | Explained
Pending Maximum Consecutive Ones Max Consecutive Ones - LeetCode https://youtu.be/1QLnjtdEl9Y Maximum Consecutive Ones | Leetcode 485 | Explained with Images
3.2 MEDIUM
Pending 2Sum Problem Two Sum - LeetCode https://youtu.be/EX2tR_cgCz4 https://codeanddebug.in/blog/two-sum-leetcode-1/
Pending Kadane's Algorithm, maximum subarray sum Maximum Subarray - LeetCode https://youtu.be/o3luQXt08W8 https://codeanddebug.in/blog/maximum-subarray-kadanes-algorithm/
Pending Stock Buy and Sell Best Time to Buy and Sell Stock - LeetCode https://youtu.be/tGrDqGxWsmc Best Time to Buy and Sell Stock | Leetcode 121 | Explained with Images
Pending Rearrange the array in alternating positive and negative items Rearrange Array Elements by Sign - LeetCode https://youtu.be/xFm1Tgc-HTI Rearrange Array Elements by Sign | Leetcode 2149
Pending Longest Consecutive Sequence in an Array Longest Consecutive Sequence - LeetCode https://youtu.be/OO2FsBeFcEs Longest Consecutive Sequence | Leetcode 128
Pending Learn 2D Matrix [Check video] Theory [Watch the Video] https://youtu.be/sfVzamPfIrw
Pending Set Matrix Zeros Set Matrix Zeroes - LeetCode https://youtu.be/_RMrP1NBftA Set Matrix Zeroes | Leetcode 73 | Explained
Pending Rotate Matrix by 90 degrees Rotate Image - LeetCode https://youtu.be/w9ofZwey57M Rotate Image | Leetcode 48 | Explained with Images
Pending Print the matrix in spiral manner Spiral Matrix - LeetCode https://youtu.be/FHnZAvZN-Co Spiral Matrix | Leetcode 54 | Explained in Python
3.3 HARD
Pending 3-Sum Problem 3Sum - LeetCode https://youtu.be/Euky4JTEK0I 3Sum | Leetcode 15 | Explained in Python
Pending 4-Sum Problem 4Sum - LeetCode https://youtu.be/8DwLOo5AOR8 4Sum | Leetcode 18 | Explained in Python
4. Binary Search
4.1 Binary Search on simple 1D Arrays
Pending Binary Search to find X in sorted array Binary Search - LeetCode https://youtu.be/fM4Yat0dERo Binary Search | Leetcode 704 | Explained in Python
Pending Implement Lower Bound Floor in a Sorted Array | Practice | GeeksforGeeks https://youtu.be/FfTbMO4o9OI Implement Lower Bound | Floor in a Sorted Array (GFG)
Pending Implement Upper Bound Implement Upper Bound - Naukri Code 360 https://youtu.be/FfTbMO4o9OI Implement Upper Bound
Pending Search Insert Position Search Insert Position - LeetCode https://youtu.be/MhsEFYyImPs Search Insert Position | Leetcode 35 | Explained in Python
Pending Floor/Ceil in Sorted Array Ceil The Floor - Naukri Code 360 https://youtu.be/W1ombWDEPJg Ceil The Floor | Binary Search Implementation
Pending Find the first or last occurrence of a given number in a sorted array
Find First and Last Position of Element in Sorted Array - LeetCode https://youtu.be/ViotQxoHip4 Find First and Last Position of Element in Sorted Array | Leetcode 34 | Optimal Binary Search
Pending Count occurrences of a number in a sorted array with duplicates Number of occurrence | Practice | GeeksforGeeks https://youtu.be/Hs49-Lws_XM Count occurrences of a number in a sorted array with duplicates | Optimal Binary Search
Pending Search in Rotated Sorted Array I Search in Rotated Sorted Array - LeetCode https://youtu.be/46kRvrls5xM Search in Rotated Sorted Array | Leetcode 33 | Optimal Binary Search
Pending Search in Rotated Sorted Array II Search in Rotated Sorted Array II - LeetCode https://youtu.be/oVcBXszcpYs Search in Rotated Sorted Array II | Leetcode 81 | Optimal Binary Search
Pending Find minimum in Rotated Sorted Array Find Minimum in Rotated Sorted Array - LeetCode https://youtu.be/_B2JakopXLc Find Minimum in Rotated Sorted Array | Leetcode 153 | Optimal Binary Search
5. Strings (please do at last) (it might contain other patterns thats why)
5.1 EASY
Pending Remove outermost Paranthesis Remove Outermost Parentheses - LeetCode https://youtu.be/yjso9jkYPbs https://codeanddebug.in/blog/remove-outermost-parentheses/
Pending Reverse words in a given string Reverse Words in a String - LeetCode https://youtu.be/EBd-u0ehi98 https://codeanddebug.in/blog/reverse-words-in-a-string/
Pending Largest odd number in a string Largest Odd Number in String - LeetCode https://youtu.be/kOiapvrtjo0 https://codeanddebug.in/blog/largest-odd-number-in-string/
Pending Longest Common Prefix Longest Common Prefix - LeetCode https://youtu.be/2iY7YYLNLAA https://codeanddebug.in/blog/longest-common-prefix/
Pending Isomorphic String Isomorphic Strings - LeetCode https://youtu.be/cX9vCdjWyBo https://codeanddebug.in/blog/isomorphic-strings/
Pending Check whether one string is a rotation of another Rotate String - LeetCode https://youtu.be/PrSGLUfmLh0 https://codeanddebug.in/blog/rotate-string/
Pending Check if two strings are anagram of each other Valid Anagram - LeetCode https://youtu.be/EnrE4tnmYZo https://codeanddebug.in/blog/valid-anagram/
5.2 MEDIUM
Pending Sort Characters by frequency Sort Characters By Frequency - LeetCode https://youtu.be/pyOb7lwnA7M https://codeanddebug.in/blog/sort-characters-by-frequency/
Pending Maximum Nesting Depth of Paranthesis Maximum Nesting Depth of the Parentheses - LeetCode https://youtu.be/5XgWK4Dj9UY https://codeanddebug.in/blog/maximum-nesting-depth-of-the-parentheses/
Pending Roman Number to Integer and vice versa Roman to Integer - LeetCode https://youtu.be/1a7aYSZtCaY https://codeanddebug.in/blog/roman-to-integer/
8. Recursion
8.1 Learn Basic Recursion
Pending Print all subsequences/Power Set Subsets - LeetCode https://youtu.be/wNp_FS1Sa_c Print all subsequences/Power Set: Complete Guide with Backtracking
Pending Print all subsequences with Sum = K Find all subsequences with sum equals to K - GeeksforGeeks https://youtu.be/Vy_6A0ZSunU Print all subsequences with Sum = K: Complete Guide with Backtracking
Pending Check if there exists a subsequence with sum K Check if there exists a subsequence with sum K | Practice | GeeksforGeeks https://youtu.be/CwUPDkzpG4A Check if there exists a subsequence with sum = K | Backtracking Solution in Python
Pending Count all subsequences with sum K Perfect Sum Problem | Practice | GeeksforGeeks https://youtu.be/d4LA8I9kxWk Count All Subsequences with Sum = K: Complete Guide with Backtracking
15. Graphs
15.1 Introduction to Graphs
Pending Graph and Types Graph and Vertices | Practice | GeeksforGeeks https://youtu.be/JIVnSenyoRU [Watch Video]
Pending Graph Representation Print adjacency list | Practice | GeeksforGeeks https://youtu.be/YS4FmJBHHDI [Watch Video]
Pending Connected Components Number of Connected Components in an Undirected Graph - LeetCode https://youtu.be/YSROdEqf3ow [Watch Video]
Pending BFS BFS of graph | Practice | GeeksforGeeks https://youtu.be/lxOw5e7ZuVg BFS Traversal in Graph | Explained using Code
Pending DFS DFS of Graph | Practice | GeeksforGeeks https://youtu.be/eqch9gKiWEQ DFS Traversal in Graph | Explained using Code
16.2 DP on 1D
Pending Climbing Stars Climbing Stairs - LeetCode https://youtu.be/VB_Qj4VWYRg Climbing Stairs | Leetcode 70 | Solved using Dynamic Programming
Pending Frog Jump Geek Jump | Practice | GeeksforGeeks https://youtu.be/oz15y1jeJRg https://codeanddebug.in/blog/frog-jump/
Pending Maximum sum of non-adjacent elements House Robber - LeetCode https://youtu.be/eyRPBmmUAc4 https://codeanddebug.in/blog/house-robber/
Pending House Robber 2 House Robber II - LeetCode https://youtu.be/9DXrm35Cvds House Robber II | Leetcode 213 | All 4 Solutions
16.4 DP on subsequences
Pending Subset sum equal to target Subset Sum Problem | Practice | GeeksforGeeks https://youtu.be/GDG84KrUfUQ Subset Sum Problem | Solved using Dynamic Programming
Pending Partition Equal Subset Sum Partition Equal Subset Sum - LeetCode https://youtu.be/s57L65SYkHc Partition Equal Subset Sum | Leetcode 416
Pending Partition Set Into 2 Subsets With Min Absolute Sum Diff Minimum sum partition | Practice | GeeksforGeeks https://youtu.be/hc_PlkbISfM Minimum sum partition | Solved using Tabulation in Python
Pending Count Subsets with Sum K Perfect Sum Problem | Practice | GeeksforGeeks https://youtu.be/-OdBMAZS4hY Perfect Sum Problem | All 4 DP Solutions in Python
Pending Count Partitions with Given Difference Partitions with Given Difference | Practice | GeeksforGeeks https://youtu.be/4EaT73nr62w Partitions with Given Difference | Optimal Solution
Pending 0/1 Knapsack 0 - 1 Knapsack Problem | Practice | GeeksforGeeks https://youtu.be/pqL1iTVUyes 0 - 1 Knapsack Problem | 5 DP Solutions in Python
16.5 DP on Strings
Pending Longest Common Subsequence Longest Common Subsequence - LeetCode https://youtu.be/GLlFa1Lo73c Longest Common Subsequence | Leetcode 1143 | All DP Approach
Pending Print Longest Common Subsequence Print all LCS sequences | Practice | GeeksforGeeks https://youtu.be/Qv0ZXe2L90I Print the Longest Common Subsequence | Build Table, Then Reconstruct
Pending Longest Common Substring Longest Common Substring | Practice | GeeksforGeeks https://youtu.be/dsARpzWOtxs Longest Common Substring | Solved using Tabulation
Pending Longest Palindromic Subsequence Longest Palindromic Subsequence - LeetCode https://youtu.be/RXsA5vYlPX8 Longest Palindromic Subsequence | Leetcode 516
Pending Minimum insertions to make string palindrome Minimum Insertion Steps to Make a String Palindrome - LeetCode https://youtu.be/790o950eDMI Minimum Insertion Steps to Make a String Palindrome | Leetcode 1312
Pending Minimum Insertions/Deletions to Convert String Delete Operation for Two Strings - LeetCode https://youtu.be/ZHUE1OR2ek8 Delete Operation for Two Strings | Leetcode 583
16.6 DP on Stocks
Pending Best Time to Buy and Sell Stock Best Time to Buy and Sell Stock - LeetCode Already Done in Arrays Section -
Pending Buy and Sell Stock - II Best Time to Buy and Sell Stock II - LeetCode https://youtu.be/QE6tM6NXMRw Best Time to Buy and Sell Stock II | Leetcode 122 | Recursion to Tabulation
Pending Buy and Sell Stocks III Best Time to Buy and Sell Stock III - LeetCode https://youtu.be/nKhfbZOz1aQ Best Time to Buy and Sell Stock III | Leetcode 123 | Dynamic Programming Solution
Pending Buy and Stock Sell IV Best Time to Buy and Sell Stock IV - LeetCode https://youtu.be/JBShufRNGzw Best Time to Buy and Sell Stock IV | Leetcode 188 | Recursion to Tabulation Approach
17. Tries
17.1 Introduction and Problems
Pending Implement TRIE | INSERT | SEARCH | STARTSWITH Implement Trie (Prefix Tree) - LeetCode https://youtu.be/qKFGIJLE3mA https://codeanddebug.in/blog/implement-trie-prefix-tree/
Pending Implement Trie - 2 (Prefix Tree) Implement Trie ll - Naukri Code 360 https://youtu.be/9gDAwZzJnZ4 https://codeanddebug.in/blog/implement-trie-ll/
Pending Longest String with All Prefixes Complete String - Naukri Code 360 https://youtu.be/nTzyGe6s0SU https://codeanddebug.in/blog/complete-string/
Pending Number of Distinct Substrings in a String Count Distinct Substrings - Naukri Code 360 https://youtu.be/f9PKrK0pqOo https://codeanddebug.in/blog/count-distinct-substrings/