0% found this document useful (0 votes)
644 views20 pages

Thriver Ashish's Complete DSA Sheet

This document outlines a 90-day roadmap for learning data structures and algorithms (DS-Algo) that covers topics important for technical interviews and becoming a good software engineer. It includes learning arrays, linked lists, stacks, queues, and recursion over 30 days, with specific problems and LeetCode questions listed for each day. The roadmap is designed to help users crack tech giant interviews and covers the essential DS-Algo concepts needed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
644 views20 pages

Thriver Ashish's Complete DSA Sheet

This document outlines a 90-day roadmap for learning data structures and algorithms (DS-Algo) that covers topics important for technical interviews and becoming a good software engineer. It includes learning arrays, linked lists, stacks, queues, and recursion over 30 days, with specific problems and LeetCode questions listed for each day. The roadmap is designed to help users crack tech giant interviews and covers the essential DS-Algo concepts needed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

@thriverashish

Ashish Gupta
Thriver Ashish's
Data Structures
and AlgoRithm
SHEET
This 90 days Roadmap covers all the topics of DS-Algo which are most important for technical
interviews and also important to become a good software engineer

This sheet also covers all the questions that are needed to be solved in order to crack tech
giants interviews

90 days

https://www.youtube.com/c/thriverashish

https://www.youtube.com/c/thrivewithashish

https://www.linkedin.com/in/thriverashish

@thriverashish
@thriverashish
Ashish Gupta
Arrays
@thriverashish 10 days
https://www.linkedin.com/in/thriverashish
https://www.youtube.com/c/thriverashish

Day 1 Day 5
Understand Big O notation (Time and
Understand Binary Search
Space complexity)
Algorithm

Search an element in the Sorted


Array
Day 2
Leetcode Question 33 -->
-- Study Basic Concepts of Array and Search in Rotated Sorted Array
get familiar with List DS in the
programming language you chose. Leetcode Question 50 -->
Implement pow(x, n), which
-- Reverse the array in place (space calculates x raised to the power
complexity should be constant) n (i.e., xn)
Input —>> 3,5,9,4,2
Output —>> 2,4,9,5,3

-- Insert an element in between of


array
Day 6
Understand 2D matrix/ @D Arrays

Day 3 and Day 4 Search a 2D Matrix Leetcode 74


Understand Quick Sort, Merge
Set Matrix to Zero —> Leetcode 73
Sort, Insertion Sort and Selection
Sort
Pascals Triangle —> Leetcode 118
Implement them all in your fav
programming language Rotate Matrix —> Leetcode 48

Day 7
Kadane’s Algo —> Maximum Subbarray Leetcode 73
Sort Array of 0’s 1’s and 2’s Leetcode 75
Two Sum Problem —> Leetcode 1
Find Duplicate
@thriverashish
Ashish Gupta
@thriverashish

https://www.linkedin.com/in/thriverashish

https://www.youtube.com/c/thriverashish

Day 8
Stock Buy and Sell --> Leetcode 121

Next Permutation --> Leetcode 32

Merge Intervals --> Leetcode 56

Merge Sorted Arrays --> Leetcode 88

Day 9
Reverse pairs --> Leetcode 493

Grid Unique Paths --> Leetcode 62


Day 6
3 Sum problem --> Leetcode 15

4 Sum Problem --> Leetcode 18

Day 10

Repeat Missing Number Array --> InterviewBit


https://www.interviewbit.com/problems/repeat-and-missing-number-array/

Longest Consecutive Subsequence —>Leetcode 128

Subarray with given Xor —> Interview Bit


https://www.interviewbit.com/problems/subarray-with-given-xor/

Longest Substring without repeat —>


@thriverashish
Ashish Gupta
LINked List
@thriverashish 04 days
https://www.linkedin.com/in/thriverashish
https://www.youtube.com/c/thriverashish

Day 13
Day 11
Add Two Numbers given in linked
Understand the concept of list
Linked List
Detect and remove Linked List
Understand its Advantages and Cycle
disadvantages over Arrays
Intersection of Two Linked Lists
Implement the Linked list in the
language you chose: Palindrome Linked List

Create Linked List class


Create a Node
Add Node
Remove Node
Day 14
Find Node in Linked List Reverse Nodes in k-Group

Rotate List

Flattening a Linked List

Copy List with Random Pointer


Day 12
Reverse Linked List

Find Middle of the Linked List

Remove Nth Node From End of


List

Merge Two Sorted Lists


@thriverashish
Ashish Gupta
STACK
@thriverashish 03 days
https://www.linkedin.com/in/thriverashish
https://www.youtube.com/c/thriverashish

Day 15
Understand the basics of Stack
Data Structures
Day 17 (Level UP)
Relate with some real-life
examples like
Next Greater Element using
📔Stack of Note books and Stack Stack --> Leetcode 496
of coins
Find largest rectangle in
📔Implement the Stack using Histogram --> Leetcode 84
Arrays (Push Pop etc
functionalities )

📔Implement the Stack with


Linked List

Day 16

Sort a Stack

Valid Parenthesis --> Leetcode 20

Retrieve Minimum Element from


the Stack --> Leetcode 155
@thriverashish
Ashish Gupta
QUEUES
@thriverashish 03 days
https://www.linkedin.com/in/thriverashish
https://www.youtube.com/c/thriverashish

Day 21
Day 18
Understand the basics of Queue Queue Reversal
Data Structures
Implement LRU Cache
Relate with some real-life
examples Implement LFU Cache

Implement the Queue using


Arrays

Implement the Queue using the


Linked List
Day 22

Learn Sliding window Coding Pattern

Sliding Window Maximum Leetcode


Day 19 239

First negative integer in every window


Implement Queue using Stack of size

Implement Stack using Queue

Implement and understand


Double Ended Queue
Day 23

Trapping Rain Water (Stack-based)


Leetcode 42

Day 20 Simplify Directory Path (Stack Based)


Leetcode 71
Understand and Implement Circular Queue (No Priority Queue for now)

Fine examples where circular Queues can be used.

Implement Producer Consumer Problem


@thriverashish
Ashish Gupta
RECURSION
@thriverashish 04 days
https://www.linkedin.com/in/thriverashish
https://www.youtube.com/c/thriverashish

Day 26
Day 24
Subset Sums
Understand Recursion and its
base conditions etc. Subsets II

Understand in depth not only


what recursion is but also what
kind of Data str it uses internally
etc.

You will get to know how


StackOverflow error occurs
Day 27

Combination Sum

Combination Sum II
Day 25
Palindrome Partitioning

Fibonacci Number Permutation Sequence

Reverse the Linked List using the


Recursive approach

Reverse LinkedList in k-groups


@thriverashish
Ashish Gupta
REVISION
@thriverashish 03 days
https://www.linkedin.com/in/thriverashish
https://www.youtube.com/c/thriverashish

Day 28

Revise Arrays
and Linked List

Day 30

Revise Recursion
Day 29 and practice

Revise Queues
and Stacks
@thriverashish
Ashish Gupta
Hashing and Hash Based DS
@thriverashish
04 days
https://www.linkedin.com/in/thriverashish
https://www.youtube.com/c/thriverashish

Day 31

Understand what exactly Hash-


Day 33
based Data structures are!
Design HashSet -- Leetcode 705
What is hashing?
Design HashMap -- Leetcode 706
What is a hash code?
Two Sum -- Leetcode 1
What is Hash Function?
Running Sum of 1D Array
Understand the concept of
Leetcode 1480
ROLLING HASH

Understand the usage and


application of Hash Tables like

-- Used to implement database


indexes.
-- Used to implement
associative arrays.
-- Used to implement the
different data structures like
Day 34
hashMap/HashSet etc
Check If a String Contains All Binary
Codes of Size K -- Leetcode 1461

Day 32 K Divisible Elements Subarrays --


Leetcode 2261
Understand the internals of
HashMap and HashSet
Number of Distinct Islands --
Leetcode 711
Read the code of the already
implemented hashMap/HashSet
library if the code is available like
in Java.

Do a bit of hands-on, iterate the


hashMap/set etc
@thriverashish
Ashish Gupta
Trees and Tries
@thriverashish 10 days
https://www.linkedin.com/in/thriverashish
https://www.youtube.com/c/thriverashish

Day 35 Day 37
Read the theory of Binary Trees Same Tree - Leetcode 100
and different types of Binary
Trees Invert Binary Tree - Leetcode 226

Understand the Node structure Symmetric Binary Tree - Leetcode 101


of Binary Tree
Left/Bottom/Top View of Binary Tree
Understand and Write Iterative
code for following Traversals Vertical Order Traversal of a Binary Tree -
Leetcode 987
Level Order Traversal
Inorder Traversal - Leetcode 194
PreOrder Traversal
Postorder Traversal Day 38
Zig Zag Level Oder Traversal
Maximum Width of Binary Tree - Leetcode 622

Maximum Depth of Binary Tree - Leetcode 104


Day 36
Diameter of Binary Tree - Leetcode 543
Implement Binary Tree
Add Node
Balanced Binary Tree - Leetcode 110
Remove Node
Traverse Node
Construct Binary Tree from Lowest Common Ancestor of a Binary Tree -
Inorder and PostOrder - Leetcode 236
Leetcode 105

Day 39
Identify the Path to the given Node

Binary Tree Maximum Path Sum - Leetcode 124

Flatten Binary Tree to Linked List - Leetcode 1114

Mirror Binary Tree

Serialize and Deserialize Binary Tree - Leetcode 297

Vertical Sum of Nodes in Binary Tree


@thriverashish
Ashish Gupta

@thriverashish 10 days
https://www.linkedin.com/in/thriverashish
https://www.youtube.com/c/thriverashish

Day 40 Day 42
Understand Binary Search Tree
Understand Self-Balancing Binary Search
Trees
Search an Element in BST -
Leetcode 700
Read and Understand Red Black Tree
Understand the Complexity of
searching in BST Read and Understand AVL Tree

Find Lowest Common Ancestor


of a given node in BST -
Leetcode 235

Convert Sorted Array to Binary Day 43


Search Tree - Leetcode 108
Understand about Quad trees and N-
Validate Binary Search Tree - Ary Trees
Leetcode 98
Understand Trie Data Structure

Implement Trie (Prefix Tree)

Day 41
Construct BST from Preorder
Traversal - Leetcode 1008

Recover BST - Leetcode 99


Day 44
Identify Predecessor and
Maximum XOR of Two Numbers in
Successor of a Node in BST
an Array - Leetcode 421
Kth Smallest Element in a BST
Maximum XOR With an Element
From Array - Leetcode 1707
Two Sum - Input is BST -
Leetcode 653
Hotel Reviews - InterviewBit
@thriverashish
Ashish Gupta
HEAP
@thriverashish 03 days
https://www.linkedin.com/in/thriverashish
https://www.youtube.com/c/thriverashish

Day 45
Understand what HEAP DS is all about like properties and all
(heap is a complete Binary Tree)

Implement its Operations (Min and Max Heap)


- Heapify
- Insert Element into Heap
- Delete Element from Heap
- Peek
- Extract Min/Max

Understand and Read Heap Data Structure Applications


-Heap is used while implementing a priority queue.
-Dijkstra's Algorithm
-Heap Sort

Day 46
Day 3 and Day 4 Distinct Numbers in the window (Interview Bit)

Merge K Sorted Arrays

Kth Largest Element in an Array - Leetcode 215

Day 47
Top K Frequent Elements - Leetcode 347

Maximum Sum Combinations - InterviewBit

Find Median from Data Stream (Hard) - Leetcode 295


@thriverashish
Ashish Gupta
GRAPH
@thriverashish 10 days
https://www.linkedin.com/in/thriverashish
https://www.youtube.com/c/thriverashish

Day 48
Day 51
Understand Graphs
Prims - Minimum spanning tree
Understand all three Graph representations and
do hands-on Kruskal - Minimum spanning tree
- Edge list
- Adjacency Matrix
- Adjacency List
Day 52
Read and Understand Different types of Graphs Topological sort
- Directed Graphs
- Weighted Graphs etc Articulation points in a graph

Bridges in a graph
Day 49 Day 50 Johnsons algorithm
Breadth-first search Dijkstra - The shorter path
(BFS) from a given node to all
vertices
Depth-first search Day 53
(DFS) Floyd Warshall - The shorter Clone Graph - Leetcode 133
path from every vertex to
every other vertex Number of Islands -- Leetcode 200

Day 54 Course Schedule -- Leetcode 207


Valid path -- Leetcode 1391

Is Graph Bipartite? -- Leetcode 785 Day 55


Smallest multiple with 0 & 1 Commutable islands
Day 57
Detect cycle in Directed
Smallest sequence with
and Undirected Graph
given primes
Day 56
Black shapes
Knight on chess board Capture regions on
board
Word ladder I
Word search board
Word ladder II
@thriverashish
Ashish Gupta
REVISION
@thriverashish 03 days
https://www.linkedin.com/in/thriverashish
https://www.youtube.com/c/thriverashish

Day 58

Revise Hashing
and Practice

Day 60

Revise Graphs
Day 59 and practice

Revise Trees
and Tries
@thriverashish
Ashish Gupta
Greedy
@thriverashish 02 days
https://www.linkedin.com/in/thriverashish
https://www.youtube.com/c/thriverashish

Day 61

Fractional Knapsack problem

N-Meetings in one room

Job Sequencing Problem

Day 62

Minimum Platforms

Find Minimum Number


@thriverashish
Ashish Gupta
Dynamic programming
@thriverashish 10 days
https://www.linkedin.com/in/thriverashish
https://www.youtube.com/c/thriverashish

Day 63 Day 66
Understand what overlapping Coin Change Leetcode 322
Subproblems mean?
Partition Equal Subset Sum
Understand memoization Leetcode 416

Fibonacci Number Minimum Cost to Cut a Stick


Leetcode 1547
Catalan Number

Day 64 Day 67 Day 68


Maximum Product Subarray Ways to decode Min jumps
Leetcode 152
Stairs Longest AP
Longest Increasing Subsequence
Leetcode 300 Jump game Evaluate expression
to true
Longest Common Subsequence
Leetcode 1143

Day 69 Day 70
Day 65 Best time to buy
Max rectangle in
binary matrix
and sell stocks - 1
Ones and Zeroes Leetcode 474
Rod cutting
Min sum path in
Edit Distance Leetcode 72 matrix
Coin sum infinite
Minimum Path Sum Leetcode 64

Day 72 Day 73
Day 71 Equal avg partition Unique BST II

Best time to buy and sell stocks II


Regex match Max sum path in BT

Arrange II
Regex match II Palindromic partitioning

Best time to buy and sell stocks III


@thriverashish
Ashish Gupta
BAcktracking
@thriverashish 05 days
https://www.linkedin.com/in/thriverashish
https://www.youtube.com/c/thriverashish

Day 74 Day 76
Understand why Backtracking?
Palindrome Partitioning -- Leetcode 131
- when should we apply
backtracking
Generate all parenthesis
- how should we apply
NQueens -- Leetcode 51
backtracking

Solve Following Questions

Subset I

Subset II

Day 77

Sudoku Solver -- Leetcode 37

Day 75 Permutations -- Leetcode 46

Combination sum -- Leetcode 39 Kth permutation sequence Leetcode -- 60

Combination sum II -- Leetcode 40

Day 78

Gray code

M-Coloring Problem

Rat in a Maze
@thriverashish
Ashish Gupta
Strings
@thriverashish 04 days
https://www.linkedin.com/in/thriverashish
https://www.youtube.com/c/thriverashish

Day 79 Day 81
Reverse Words in a String
Leetcode 151 Implement strStr() {Z Function}
Leetcode 28
Longest Palindromic Substring
Leetcode 5 KMP algo / LPS(pi) array -- Leetcode 28

Roman to Integer Leetcode 13 Minimum Characters required to make


a String Palindromic -- Inerview bit

Day 80
Day 82
String to Integer (atoi)
Leetcode 8 Valid Anagram -- Leetcode 242

Longest Common Prefix Count and Say -- Leetcode 38


Leetcode 14
Compare Version Numbers -- Leetcode 165
Rabin Carp
@thriverashish
Ashish Gupta
Random Questions
@thriverashish 08 days
https://www.linkedin.com/in/thriverashish
https://www.youtube.com/c/thriverashish

Day 83-85

Solve Random Array,


Linked List, Stacks
and Queue Questions
Day 86

Solve Random
Recursion Hashing,
Day 59
Tree, and Graph
Solve Random DP, Questions
Backtracking, Strings,
and other Questions
Day ...

Start Applying,
you are Ready
@thriverashish
Ashish Gupta
Good LUCK
@thriverashish
https://www.linkedin.com/in/thriverashish
https://www.youtube.com/c/thriverashish

Day ...

You might also like