Dsa Sheet by Nishant Chahar: Question Link
Dsa Sheet by Nishant Chahar: Question Link
Linked Lists
1 reverse LinkedList
2 K reverse
3 Floyd cycle
4 Merge LinkedList
5 Clone a linkedlist
6 find modular node
7 Remove duplicate from sorted
8 Find the middle element
9 Nth element from end
10 LRU Cache
Binary Tree
1 Inorder Traversal
2 Preorder Traversal
3 Postorder Traversal
4 Print ancestor of given tree
5 Binary Tree Level Order
6 Average of levels
7 All Nodes at distance K
8 Count bst in a given range
9 Binary search tree to greater sum
10 Binary Tree Cameras
11 Binary Tree Maximum Path Sum
12 Binary Tree to BST
13 right side view
14 Left View
15 Vertical order
16 Top View
17 Bottom View
18 Diagonal Traversal
19 leftmost and rightmost node
20 kth smallest element
21 Binary Tree Tilt
22 Print all nodes that dont have siblings
23 House robber 3
24 Boundary Traversal
14 Rabbits in forest
Heap
1 Binary heap
2 Build heap from array
3 Island perimeter
4 skyline problem
5 Pairs of coinciding points
6 trapping rain water
7 Trapping Rain Water II
8 Sort a nearly sorted array
9 bulb switcher
10 max frequency stack
11 Sliding window maximum
12 Swim in rising water
13 Heap sort
14 Product of Array Except Self
15 K empty slots
16
17 mathematics
18
19 Sieve of Eratosthenes
20 Segmented sieve
21 Squares of a Sorted Array
22 Fast Exponentiation
23 Fibonacci Number
24 Container With Most Water
1 Segregate 0 and 1
2 Segregate 0-1-2
3 Sort Array By Parity
4 MIn Jump required with +i or -i allowed
5 Max chunks to make sorted
6 Max Chunks To Make Sorted II
7 Two Sum
8 Two Difference
9 LPS
10 Shortest Palindrome
11 Boats to Save People
12 Min No. of Platform
13 Maximum Swap
14 Optimal Division
15 Max Consecutive Ones II
16 max consecutive ones 3
17 majority element
18 majority element 2
19 majority element general
20 Reverse vowels of a string
21 First missing positive
22 push dominoes
23 moving stones until consecutive 2
24 max product of 3 numbers
25 largest number atleast twice of others
26 maximum product subarray
27 rotate image
28 number of subarrays with bounded maximum
29 partition labels
30 global and local inversions
31 partition array into disjoint intervals
32 valid pallindrome 2
33 consecutive number sum
34 minimum domino rotation for equal row
35 multiply strings
36 smallest range from k lists
37 pascal triangle 2
38 max sum of two non overlapping subarrays
39 maximize distance to closest person
40 Subarrays with k different integers
41 Icing on cake
42 search in rotated sorted array
43 split array largest sum
44 counting sort
45 capacity to ship within D days
46 insertion sort
47 koko eating bananas
48 median of two sorted array
49 merge sort
50 smallest divisor given a threshold
51 wiggle sort
52 best meeting points
Graph
1 BFS of graph
2 Bipartite graph
3 DFS
4 detect cycle in undirected graph
5 Prim's Algo
6 Dijkstra algo
7 chef and reversing
8 Bus routes
9 evaluate division
10 topological sorting
11 Kahn's algo
12 course schedule 2
13 Strongly Connected Components (Kosaraju's Algo)
14 Mother Vertex
15 Rotting Oranges
16 bellman ford
17 Number of Islands
18 DSU
19 Number of Enclaves
20 Most Stones Removed with Same Row or Column
21 Regions Cut By Slashes
22 Kruskal's algo
23 Articulation point
24 Doctor Strange
25 Satisfiability of Equality Equations
26 0-1 matrix
27 Word Ladder
28 Job Sequencing
29 Eulerian Path in an Undirected Graph
30 Euler Circuit in a Directed Graph
31 Castle RUN
32 Sentence Similarity II
33 Number of Distinct Islands
34 Number of Islands II
35 Parallel courses
36 optimize water distribution in village
37 connecting cities with minimum cost
Dynamic programming
BFS/DFS
Sliding Puzzle
1 Find the Maximum Flow
2 Maximum Bipartite Matching
3 Reconstruct Itinerary
4 Redundant Connection
5 Redundant connection 2
6 Possible Bipartition
7 Floyd Warshall
8 Johnson's algorithm
9 Journey to the moon
10 Sort item by group accord to dependencies
11 As far from land as possible
11 K-Similar Strings
12 Similar String Groups
13 Coloring A Border
14 Shortest bridge
15 Min swaps required to sort array
16 Walls and gates
17 The maze 2
Text processing
1 KMP
2 Find string roots
3 Z algo
4 chef and secret password
5 Manacher's algo
Number theory
1 Euclidean algorithm
2 Extended Euclidean algorithm
3 Linear diaophantine equation
4 Euler's totient function
5 Divisors upto n
6 Fermat's little theorem
7 No min No max
8 Boring factorials
9 FFT
Geometry
1 Erect the fence
Game Theory
1 5 Pirates and 100 coins
2 Nim game
3 Buddy nim
DONE
HINT