# DSA & System Design Practice Plan
###### tags: `dream company`,`amazon`,`google`,`intuit`,`netflix`,`walmart`,`VISA`
> This is the practice plan for the next 3 months to redirect focus on necessary topics. :computer:
## :memo: Where do I start? What do I follow?
### Step 1: Prep Stage
- [ ] Be motivated- keep reminding why do you need this
- [ ] Try waking up early in the morning
- [ ] Be Focussed
- [ ] Dedicate 8 hours per day
- [ ] Additional 2 hours *2 =4 Hours during office transit per day
:rocket:
### Step 2: Data Structures and Algorithms: Topics to be covered
Following are the topics that need to be covered:
:link:[GeeksForGeeks](https://www.geeksforgeeks.org/must-do-coding-questions-for-companies-like-amazon-microsoft-adobe/)
:::info
:bulb: **Tips:**
1. Solve it in Leet Code/ InterviewBit/ GeeksForGeeks/ Hackerrank.
2. First try solving a problem by keeping half an hour timer. In case I am not able to solve it, switch off the timer and try solving it offline without time restrictions.
3. If I am still not able to solve it after at max 1 hour, Go to next problem. Meanwhile, think of the possible solution to that problem.
4. Finally, take help of Google and then solve it and learn it.
5. Practice coding in Google Docs- The code written in doc should be free of compilation errors. This helps you to write error free code during interviews.
6. These are only the practice problems for you to get familiar with coding. Once you solve these, try to solve more and more and more on each topic!
:::
1. **Arrays:**
- [ ] Subarray with given sum
- [ ] Count the triplets
- [ ] Kadane’s Algorithm
- [ ] Missing number in array
- [ ] Merge two sorted arrays
- [ ] Rearrange array alternatively
- [ ] Number of pairs
- [ ] Inversion of Array
- [ ] Sort an array of 0s, 1s and 2s
- [ ] Equilibrium point
- [ ] Leaders in an array
- [ ] Minimum Platforms
- [ ] Reverse array in groups
- [ ] K’th smallest element
- [ ] Trapping Rain Water
- [ ] Pythagorean Triplet
- [ ] Chocolate Distribution Problem
- [ ] Stock buy and sell
- [ ] Element with left side smaller and right side greater
- [ ] Convert array into Zig-Zag fashion
- [ ] Last Index of 1
- [ ] Spirally traversing a matrix
- [ ] Largest Number formed from an Array
1. **Strings:**
- [ ] Reverse words in a given string
- [ ] Permutations of a given string
- [ ] Longest Palindrome in a String
- [ ] Recursively remove all adjacent duplicates
- [ ] Check if string is rotated by two places
- [ ] Roman Number to Integer
- [ ] Anagram
- [ ] Remove Duplicates
- [ ] Form a Palindrome
- [ ] Longest Distinct Characters in the string
- [ ] Implement Atoi
- [ ] Implement strstr
- [ ] Longest Common Prefix
1. **Linked List:**
- [ ] Finding middle element in a linked list
- [ ] Reverse a linked list
- [ ] Rotate a Linked List
- [ ] Reverse a Linked List in groups of given size
- [ ] Intersection point in Y shaped linked lists
- [ ] Detect Loop in linked list
- [ ] Remove loop in Linked List
- [ ] n’th node from end of linked list
- [ ] Flattening a Linked List
- [ ] Merge two sorted linked lists
- [ ] Intersection point of two Linked Lists
- [ ] Pairwise swap of a linked list
- [ ] Add two numbers represented by linked lists
- [ ] Check if Linked List is Palindrome
- [ ] Implement Queue using Linked List
- [ ] Implement Stack using Linked List
- [ ] Given a linked list of 0s, 1s and 2s, sort it
- [ ] Delete without head pointer
1. **Stacks and Queues:**
- [ ] Parenthesis Checker
- [ ] Next larger element
- [ ] Queue using two Stacks
- [ ] Stack using two queues
- [ ] Get minimum element from stack
- [ ] LRU Cache
- [ ] Circular tour
- [ ] First non-repeating character in a stream
- [ ] Rotten Oranges
- [ ] Maximum of all subarrays of size k
1. **Trees:**
- [ ] Concepts
- [ ] Traversals - Preorder, Postorder, inorder, BFS, DFS, Level order Traversals
- [ ] BSTs
- [ ] BBSTs
- [ ] Print Left View of Binary Tree
- [ ] Check for BST
- [ ] Print Bottom View of Binary Tree
- [ ] Print a Binary Tree in Vertical Order
- [ ] Level order traversal in spiral form
- [ ] Connect Nodes at Same Level
- [ ] Lowest Common Ancestor in a BST
- [ ] Convert a given Binary Tree to Doubly Linked List
- [ ] Write Code to Determine if Two Trees are Identical or Not
- [ ] Given a binary tree, check whether it is a mirror of itself
- [ ] Height of Binary Tree
- [ ] Maximum Path Sum
- [ ] Diameter of a Binary Tree
- [ ] Number of leaf nodes
- [ ] Check if given Binary Tree is Height Balanced or Not
- [ ] Serialize and Deserialize a Binary Tree
1. **Heap:**
- [ ] Find median in a stream
- [ ] Heap Sort
- [ ] Operations on Binary Min Heap
- [ ] Rearrange characters
- [ ] Kth largest element in a stream
- [ ] Merge K sorted linked lists
- [ ] Kth largest element in a stream
1. **Recursion:**
- [ ] Flood fill Algorithm
- [ ] Number of paths
- [ ] Combination Sum – Part 2
- [ ] Special Keyboard
- [ ] Josephus problem
1. **Backtracking:**
- [ ] [Concepts](https://www.interviewbit.com/courses/programming/topics/backtracking/)
- [ ] N-Queen Problem
- [ ] Solve the Sudoku
- [ ] Rat in a Maze Problem
- [ ] Word Boggle
- [ ] Generate IP Addresses
1. **Hashing:**
- [ ] [Concepts](https://www.interviewbit.com/courses/programming/topics/hashing/)
- [ ] Relative Sorting
- [ ] Sorting Elements of an Array by Frequency
- [ ] Largest subarray with 0 sum
- [ ] Common elements
- [ ] Find all four sum numbers
- [ ] Swapping pairs make sum equal
- [ ] Count distinct elements in every window
- [ ] Array Pair Sum Divisibility Problem
- [ ] Longest consecutive subsequence
- [ ] Array Subset of another array
- [ ] Find all pairs with a given sum
- [ ] Find first repeated character
- [ ] Zero Sum Subarrays
- [ ] Minimum indexed character
- [ ] Check if two arrays are equal or not
- [ ] Uncommon characters
- [ ] Smallest window in a string containing all the characters of another string
- [ ] First element to occur k times
- [ ] Check if frequencies can be equal
1. **Bit Manipulation:**
- [ ] Find first set bit
- [ ] Rightmost different bit
- [ ] Check whether K-th bit is set or not
- [ ] Toggle bits given range
- [ ] Set kth bit
- [ ] Power of 2
- [ ] Bit Difference
- [ ] Rotate Bits
- [ ] Swap all odd and even bits
- [ ] Count total set bits
- [ ] Longest Consecutive 1’s
- [ ] Sparse Number
- [ ] Alone in a couple
- [ ] Maximum subset XOR
1. **Greedy Algorithm:**
- [ ] [Concepts](https://www.interviewbit.com/courses/programming/topics/greedy-algorithm/)
- [ ] Activity Selection
- [ ] N meetings in one room
- [ ] Coin Piles
- [ ] Maximize Toys
- [ ] Page Faults in LRU
- [ ] Largest number possible
- [ ] Minimize the heights
- [ ] Minimize the sum of product
- [ ] Huffman Decoding
- [ ] Minimum Spanning Tree
- [ ] Shop in Candy Store
- [ ] Geek collects the balls
1. **Dynamic Programming:**
- [ ] [Concepts](https://www.interviewbit.com/courses/programming/topics/dynamic-programming/)
- [ ] Minimum Operations
- [ ] Max length chain
- [ ] Minimum number of Coins
- [ ] Longest Common Substring
- [ ] Longest Increasing Subsequence
- [ ] Longest Common Subsequence
- [ ] 0 – 1 Knapsack Problem
- [ ] Maximum sum increasing subsequence
- [ ] Minimum number of jumps
- [ ] Edit Distance
- [ ] Coin Change Problem
- [ ] Subset Sum Problem
- [ ] Box Stacking
- [ ] Rod Cutting
- [ ] Path in Matrix
- [ ] Minimum sum partition
- [ ] Count number of ways to cover a distance
- [ ] Egg Dropping Puzzle
- [ ] Optimal Strategy for a Game
- [ ] Shortest Common Supersequence
1. **Divide and Conquer:**
- [ ] Concepts
- [ ] Problems
- [ ] :rocket:[Link to problems](https://www.geeksforgeeks.org/divide-and-conquer/?ref=ghm)
1. Sorting:
- [ ] [Bubble Sort](https://www.interviewbit.com/tutorial/bubble-sort/)
- [ ] Insertion Sort
- [ ] Selection Sort
- [ ] Merge Sort
- [ ] [Quick Sort](https://www.interviewbit.com/tutorial/quicksort-algorithm/)
- [ ] Time and space complexity analysis of the above sorts
1. **Graphs:**
- [ ] Concepts
- [ ] [BFS](https://www.interviewbit.com/tutorial/breadth-first-search/)
- [ ] [DFS](https://www.interviewbit.com/tutorial/depth-first-search/)
- [ ] [Djkstra's Algorithm](https://www.interviewbit.com/tutorial/dijkstra-algorithm/
)
- [ ] Topological Sort
- [ ] Disjoint Sets
- [ ] Minimum Spanning Trees
- [ ] Problems
- [ ] :rocket:[Link to problems](https://www.geeksforgeeks.org/graph-data-structure-and-algorithms/)
:link:[Language wise Interview Questions](https://github.com/sukanya-pai/awesome-interview-questions)
:link:[Data Strucuture Interview Questions](https://www.interviewbit.com/data-structure-interview-questions/)
### Step 3: System Design:
1. **Gathering Requirements**
2. **High Level Design**
- [ ] :rocket:[Learn HLD concepts from here](https://www.youtube.com/playlist?list=PLMCXHnjXnTnvo6alSjVkgxV-VH6EPyvoX)
4. **Low Level Design**
- [ ] :rocket:[Learn Low Level Design Patterns](https://github.com/sukanya-pai/design-patterns-for-humans)
5. **Concepts to be covered:**
- [ ] Load Balancer
- [ ] Messaging Queues
- [ ] Cache
- [ ] DataBase Sharding
- [ ] Distributed Design
6. **Design the below:**
- [ ] Stackoverflow
- [ ] BookMyShow
- [ ] Instagram
- [ ] Netflix
- [ ] Youtube
- [ ] Swiggy
- [ ] Flight Reservation System
- [ ] Parking Lot System
- [ ] Twitter
- [ ] Paste Bin
- [ ] Tiny Url
- [ ] Whatsapp
- [ ] Quora, Reddit
- [ ] DropBox, Drive
- [ ] Uber,Lyft
- [ ] Search Engine Related (Type Aheads)
:link:[System Design Github resource](https://github.com/donnemartin/system-design-primer)
:link:[More Info on System Design](https://hackernoon.com/top-10-system-design-interview-questions-for-software-engineers-8561290f0444)