Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ZeeshanAdilButt/3dc49b03f182df4a4afb2c1219dc7043 to your computer and use it in GitHub Desktop.
Save ZeeshanAdilButt/3dc49b03f182df4a4afb2c1219dc7043 to your computer and use it in GitHub Desktop.
DSA Roadmap to Leetcode 150+ Problems
Some considerations while starting with problem solving till 100+ Leetcode problems are solved:
- Start with the most-easiest problems.
- DO NOT try to solve each problem yourself, instead try to learn and understand how different problems are being solved
- Do not try to solve a problem for more than 1 hour initially to get fast and to achieve more in less time, for any problem taking more than 1 hour, put it in a backlog and solve it later
- Average time to solve a problem should be 3-45 minutes
- Do not try to solve a lot of problems from one topic, instead try to solve 5-10 problems per topic
- Do not try to jump into problem solving directly wihtout the necessary pre-requisites, For example
> If you are trying to solve a problem that requires HashSet/HashMap then make sure you have studied HashMap before solving the problem
> If you are trying to solve a problem that uses recursion, first make sure you learn recursion properly
> If you are trying to solve a problem that uses graphs/tree, first make sure you learn graphs/tree properly
> If you are trying to solve a problem that uses dynamic programming, first make sure you learn dynamic programming properly.
Week 1- Data Structures Overview:
- Basic Understanding of Data structures in your language (C++ STL, C# Collections, Python Standard Library)
- If you like C++ and more details > My code school Data Structures
https://www.youtube.com/playlist?list=PL2_aWCzGMAwI3W_JlcBbtYTwiQSsOTa6P (C++)
- If you like Python > code basics - Data Structures
https://www.youtube.com/playlist?list=PLeo1K3hjS3uu_n_a__MI_KktGTLYopZ12
- Introduction to Hash Tables and Dictionaries by CS Dojo:
https://www.youtube.com/watch?v=sfWyugl4JWA
Week 2 - 25 EASY problems ( 3-4 hours a day | 4 problems a day):
Easy String Algorithms
- String as character arrays:
video: https://www.youtube.com/watch?v=TkTgo_7ab0M&pp=ygUQcHJpbnQgY2hhcmFjdGVycw%3D%3D
- Count characters in string
video: https://www.youtube.com/watch?v=kWr0TIjO6nU
- Arrays & Hashing:
- Contains Duplicate
video: https://www.youtube.com/watch?v=3OamzN90kPg
problem: https://leetcode.com/problems/contains-duplicate/
- Valid Anagram:
video: https://www.youtube.com/watch?v=9UtInBqnCgA
problem: https://leetcode.com/problems/valid-anagram/
- Two Sum:
video: https://www.youtube.com/watch?v=KLlXCFG5TnA
problem: https://leetcode.com/problems/group-anagrams/
- Length of Last word:
video: https://www.youtube.com/watch?v=KT9rltZTybQ&list=PLot-Xpze53lfQmTEztbgdp8ALEoydvnRQ&index=27
problem:
- Search Insert Position
video: https://www.youtube.com/watch?v=K-RYzDZkzCI&list=PLot-Xpze53lfQmTEztbgdp8ALEoydvnRQ&index=23
problem:
- Two Pointers:
- Valid Palindrome
video: https://leetcode.com/problems/valid-palindrome/
problem: https://leetcode.com/problems/valid-palindrome/
- Best time to buy and Sell Stock:
video: https://www.youtube.com/watch?v=1pkOgXD63yU&list=PLot-Xpze53lfQmTEztbgdp8ALEoydvnRQ&index=7&pp=iAQB
problem: https://leetcode.com/problems/best-time-to-buy-and-sell-stock/
- Stack & Queue Problems:
- Valid Parenthesis
video: https://www.youtube.com/watch?v=WTzjTskDFMg
problem: https://leetcode.com/problems/valid-parentheses/
- Implement Stack using Queue:
video: https://www.youtube.com/watch?v=rW4vm0-DLYc&list=PLot-Xpze53lfxD6l5pAGvCD4nPvWKU8Qo&index=10
problem: https://leetcode.com/problems/implement-stack-using-queues/
- Implement Queue using Stack:
video: https://www.youtube.com/watch?v=3Et9MrMc02A&pp=ygUabmVldGNvZGUgcXVldWUgdXNpbmcgc3RhY2s%3D
problem: https://leetcode.com/problems/implement-queue-using-stacks/
- Sqrt(x)
problem: https://leetcode.com/problems/sqrtx/
video:
- 704. Binary Search
problem: https://leetcode.com/problems/binary-search/
video:
- 1351. Count Negative Numbers in a Sorted Matrix
problem: https://leetcode.com/problems/count-negative-numbers-in-a-sorted-matrix/
video:
- 1351. Peak Index in a Mountain Array
problem: https://leetcode.com/problems/peak-index-in-a-mountain-array/
video:
- Find Peak element:
video: https://www.youtube.com/watch?v=CFgUQUL7j_c
problem:
- Maximum Sub Array:
video: https://www.youtube.com/watch?v=5WZl3MMT0Eg&list=PLot-Xpze53lfQmTEztbgdp8ALEoydvnRQ&index=4
problem: https://leetcode.com/problems/maximum-subarray/
- Linked List:
course with problems (find all the similar problems on leetcode):
video: https://www.youtube.com/watch?v=Hj_rA0dhr2I&pp=ygUXbGlua2VkbGlzdCBmcmVlY29kZWNhbXA%3D
Linked list problems:
- 206. Reverse Linked List
https://leetcode.com/problems/reverse-linked-list/
https://www.youtube.com/watch?v=G0_I-ZF0S38
- Merge 2 sorted Lits
https://leetcode.com/problems/merge-two-sorted-lists/
https://www.youtube.com/watch?v=XIdigk956u0
- Linked List Cycle
https://leetcode.com/problems/linked-list-cycle/
https://www.youtube.com/watch?v=gBTe7lFR3vc
- Reverse Linked List - Iterative AND Recursive
video: https://www.youtube.com/watch?v=G0_I-ZF0S38&list=PLot-Xpze53lfQmTEztbgdp8ALEoydvnRQ&index=10&pp=iAQB
code: https://leetcode.com/problems/reverse-linked-list/
- Palindrome Linked List
video: https://www.youtube.com/watch?v=yOzXms1J6Nk&list=PLot-Xpze53lfQmTEztbgdp8ALEoydvnRQ&index=13
problem:
- Remove Linked List element:
video: https://www.youtube.com/watch?v=JI71sxtHTng&list=PLot-Xpze53lfQmTEztbgdp8ALEoydvnRQ&index=21&pp=iAQB
problem:
@SandSniffer
Copy link

peak ty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment