Hafiza-Jabeen-Iqbal / Data-Structures-RoadMap

Data structures roadmap to solve 150+ leetcode problems in 5 weeks with a good understanding of basics and techniques

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Data-Structures-RoadMap

Data structures roadmap to solve 150+ leetcode problems in 5 weeks with a good understanding of basics and techniques

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 30-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 without 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/trees, 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:

Week 2 - 25 EASY problems ( 3-4 hours a day | 4 problems a day):

Recursion Course ( don't watch the trees or graphs section):

https://www.youtube.com/watch?v=IJDJ0kBx2LM

Week 3

Hash table

1- Happy Number https://leetcode.com/problems/happy-number/

2- Isomorphic Strings https://leetcode.com/problems/isomorphic-strings/

3- Missing Number https://leetcode.com/problems/missing-number/

4- Word Pattern https://leetcode.com/problems/word-pattern/

5- Next Greater Element I https://leetcode.com/problems/next-greater-element-i/

Trees

Recursion Course (watch the trees section):

https://www.youtube.com/watch?v=IJDJ0kBx2LM

Trees Full Course: https://www.youtube.com/watch?v=fAAZixBzIAI

Graphs

Recursion Course ( watch the graphs section):

https://www.youtube.com/watch?v=IJDJ0kBx2LM

Graphs Full Course:

https://www.youtube.com/watch?v=tWVWeAqZ0WU

1-Find the Town Judge

video: https://www.youtube.com/watch?v=ZUP_tIs4VaE

problem https://leetcode.com/problems/find-the-town-judge/

2- Find Center of Star Graph

video: https://www.youtube.com/watch?v=KEKcW6eLyEY

problem: https://leetcode.com/problems/find-center-of-star-graph/

3-Find if Path Exists in Graph

video: https://www.youtube.com/watch?v=QC4bDHEnmLM&pp=ygUfMTc5MS4gRmluZCBDZW50ZXIgb2YgU3RhciBHcmFwaA%3D%3D

problem: https://leetcode.com/problems/find-if-path-exists-in-graph/

DFS

1- Binary Tree Inorder Traversal

2- Binary Tree Preorder Traversal

3- Binary Tree Postorder Traversal

4- Validate Binary Search Tree

5- Path Sum

6- Pacific Atlantic Water Flow

BFS

1- Binary Tree Level Order Traversal

2- Maximum Depth of Binary Tree

3- Same Tree

Graph Algorithm for Technical Interview

Week 4:

Dynamic Programming (DP):

Dynamic Programming (DP) Full Course: https://www.youtube.com/watch?v=oBt53YbR9Kk&t=29s

Week 5 - Backtracking

simple trick backtracking is DP which undoes its operation if it doesn't find the answer:

1- Letter Combinations of a Phone Number
problem https://leetcode.com/problems/letter-combinations-of-a-phone-number/
video: https://www.youtube.com/watch?v=irkG33phXuw

2- The k-th Lexicographical String of All Happy Strings of Length n
problem https://leetcode.com/problems/the-k-th-lexicographical-string-of-all-happy-strings-of-length-n/
video: https://www.youtube.com/watch?v=t3Hb0NYOA1c

++++++++++++++++++++++++++++++++++++++++++

Some more nice problems (to be updated):

  1. Best Time to Buy and Sell Stock

  2. First Bad Version

  3. Isomorphic Strings

  4. Two Sum

  5. Squares of a Sorted Array

  6. Merge Two Sorted Lists

  7. Is Subsequence

  8. Two Sum II - Input Array Is Sorted

  9. Rotate Array

  10. Reverse Linked List

  11. Search Insert Position

Some good resources (to be updated):

About

Data structures roadmap to solve 150+ leetcode problems in 5 weeks with a good understanding of basics and techniques