Curious Freaks Coding Sheet

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Curious freaks CODING SHEET by Nandhini

Checkout this video to understand efficient way to use this sheet - https://youtu.be/ALpP5ZFokjQ
Youtube Channel - https://www.youtube.com/@curiousfreaks_
Lets use #CFCodingSheet tag to share with friends on social media - https://www.instagram.com/its_me_nandyy
Connect with me on LinkedIn - https://www.linkedin.com/in/nandhini-raja-8b71b4143/
Only sheet you need to get placed in super high paying companies including google, amazon, salesforce, microsoft, adobe, etc
Solving time - Easy Problems - 5 to 10mins
Solving time - Medium Problems - 15 to 20mins
Solving time - Hard problems - At max 45mins - 50mins

Imp Note: Its not necessary that you know a topic, so for every topic you have here, first understand the basics of the topic, then for every pattern, you can learn the first prob in that pattern and then try solving other probs in that pattern yourself.

TOPIC Problem Problem link Solution Tutorial Solution Article Solved Notes
Basics
Beginners basic math probs
Find even or odd https://practice.geeksforgeeks.org/problems/odd-or-even3618/1 Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
Find last digit in a number find-last-digit-of-ab-for-large-numbers1936/1 Best Tutorial link - click to view Article link-click to view
Count digits in a number(Solving above last digit prob wil make this easy for you) https://practice.geeksforgeeks.org/problems/count-digits5716/1 Best Tutorial link - click to view Article link-click to view
Reverse a number(Try thinking how you can use above logic in solving this) https://www.geeksforgeeks.org/problems/reverse-digit0316/1 Best Tutorial link - click to view Article link-click to view
Find power of a number https://www.geeksforgeeks.org/problems/power-of-numbers-1587115620/1 Best Tutorial link - click to view Article link-click to view
GCD https://practice.geeksforgeeks.org/problems/gcd-of-two-numbers3459/1 Best Tutorial link - click to view Article link-click to view
https://www.codingninjas.com/studio/problems/
Print all divisors of a number print-all-divisors-of-a-number_1164188 Best Tutorial link - click to view Article link-click to view
Prime number(Try solving by yourself) https://practice.geeksforgeeks.org/problems/prime-number2314/1 Best Tutorial link - click to view Article link-click to view
Armstrong number(Solving power of number, will make this easy for you) https://www.geeksforgeeks.org/problems/armstrong-numbers2727/1 Best Tutorial link - click to view Article link-click to view
Check palindrome of number(Use the techniques you learnt so far solving above probs and solve
this by yourself) https://practice.geeksforgeeks.org/problems/palindrome0746/1 Best Tutorial link - click to view Article link-click to view
Square root of a number(Try to first figure out algo to solve this) https://www.geeksforgeeks.org/problems/square-root/1 Best Tutorial link - click to view Article link-click to view
Perfect number https://practice.geeksforgeeks.org/problems/perfect-numbers3207/1 Best Tutorial link - click to view Article link-click to view
This is a huge topic and array acts as base data structure for many concepts, so lets
master the basics in this section. For all the data struture moving forward, make sure to
Array - Data structure visually note down and understand how it is represented
Basics with traversal
What is an array? How is it represented? Best Tutorial link - click to view Article link-click to view
Find the maximum and minimum element in array(After solving the search , you can solve all https://www.geeksforgeeks.org/problems/
probs in this basics by yourself) find-minimum-and-maximum-element-in-an-array4428/1 Best Tutorial link - click to view Article link-click to view
Find third largest element in array https://practice.geeksforgeeks.org/problems/third-largest-element/1 Best Tutorial link - click to view Article link-click to view
Search an element in array(Understand how to traverse through the array and how to access the https://www.geeksforgeeks.org/problems/
elements) search-an-element-in-an-array-1587115621/1 Best Tutorial link - click to view Article link-click to view
https://practice.geeksforgeeks.org/problems/
Find missing number in array missing-number-in-array1416/1 Best Tutorial link - click to view Article link-click to view
Find repeating number in array Best Tutorial link - click to view
https://www.geeksforgeeks.org/problems/
sort-an-array-of-0s-1s-and-2s4231/1?
Sort an array of 0s , 1s and 2s (You dont need to know any sorting algo, just using basics, once itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
solved, definitely learn the optimal algo) ticky_on_Article Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
check-if-two-arrays-are-equal-or-not3847/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Check if two arrays are equal or not ticky_on_Article Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
cyclically-rotate-an-array-by-one2614/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Rotate the array by 1 ticky_on_Article Best Tutorial link - click to view Article link-click to view
Rotate the array by k https://www.codingninjas.com/studio/problems/rotate-array_1230543 Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
Array subset of another array array-subset-of-another-array2317/1 Best Tutorial link - click to view Article link-click to view
Learn what is map and how its represented before moving forward Best Tutorial link - click to view Article link-click to view
https://practice.geeksforgeeks.org/problems/
Count frequency of elements in array(Solve efficiently, try applying what you learnt about map) frequency-of-array-elements-1587115620/1 Best Tutorial link - click to view Article link-click to view
Two pointer(This is very imp pattern,
not just for these probs but very
commonly you can use this technique) Just like search, sort, this is also imp technique to learn
https://www.geeksforgeeks.org/problems/key-pair5616/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Find pair with given sum ticky_on_Article Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
triplet-sum-in-array-1587115621/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
3 Sum ticky_on_Article Best Tutorial link - click to view Article link-click to view
4 Sum https://leetcode.com/problems/4sum/ Best Tutorial link - click to view Article link-click to view
Find triplets with zero sum https://www.geeksforgeeks.org/problems/find-triplets-with-zero-sum/1 Best Tutorial link - click to view Article link-click to view
Find count of triplets Count the triplets | Practice | GeeksforGeeks Best Tutorial link - click to view Article link-click to view
Union of two arrays(Learn the brute force & optimal soln, you will learn about set datastructure,
which will be super useful in many probs in brute force) https://www.geeksforgeeks.org/problems/union-of-two-arrays3538/1 Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
intersection-of-two-arrays2404/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Intersection of two arrays ticky_on_Article Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
remove-duplicate-elements-from-sorted-array/1?
Remove duplicates from array(Quite diff from above, try to solve on own, this actually shows that itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
not always you will have pointers at start and end) ticky_on_Article Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
k-th-element-of-two-sorted-array1317/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
kth element of 2 sorted arrays ticky_on_Article Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
longest-sub-array-with-sum-k0809/1?
itm_source=geeksforgeeks&itm_medium=article&itm_campaign=bottom_s
Length of longest subarray with sum k ticky_on_article Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
trapping-rain-water-1587115621/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Trapping rain water ticky_on_Article Best Tutorial link - click to view Article link-click to view
Must Solve
Majority element https://leetcode.com/problems/majority-element/ Best Tutorial link - click to view Article link-click to view
https://practice.geeksforgeeks.org/problems/
Kadane's algo(super imp) kadanes-algorithm-1587115620/1 Best Tutorial link - click to view Article link-click to view
https://practice.geeksforgeeks.org/problems/
Count inversions inversion-of-array-1587115620/1 Best Tutorial link - click to view Article link-click to view
Merge intervals https://leetcode.com/problems/merge-intervals/ Best Tutorial link - click to view Article link-click to view
https://practice.geeksforgeeks.org/problems/
Maximum product subarray maximum-product-subarray3604/1 Best Tutorial link - click to view Article link-click to view
Next permutation https://leetcode.com/problems/next-permutation/ Best Tutorial link - click to view Article link-click to view
Seive of eranthoses(Popular algo for prime numbers) https://www.geeksforgeeks.org/problems/sieve-of-eratosthenes5242/1 Best Tutorial link - click to view Article link-click to view
Time and space complexity https://youtu.be/FPu9Uld7W-E?si=s_d6cjdb6UtlVg16 - After learning this, make sure to learn time and space complexity for all the problems moving forward
Once you learn this, in many advanced topics like graphs, DP, backtracking, this is super imp.
Matrix - Data structure This section is to learn 2D array and to get grip on basics
Traversal & Basic & Must solve
What is a 2D Array? How to access element? Best Tutorial link - click to view Article link-click to view
Search in a matrix https://leetcode.com/problems/search-a-2d-matrix/ Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
Rotate by 90 degree rotate-by-90-degree-1587115621/1 Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
row-with-minimum-number-of-1s5430/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Maximum num of 1's row ticky_on_Article Best Tutorial link - click to view Article link-click to view
https://practice.geeksforgeeks.org/problems/
Left rotate matrix k times left-rotate-matrix-k-times2351/1 Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/print-matrix-in-diagonal-pattern/
1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Print matrix in diagonal pattern ticky_on_Article Best Tutorial link - click to view Article link-click to view
Set matrix zeros https://leetcode.com/problems/set-matrix-zeroes/ Best Tutorial link - click to view Article link-click to view
Recursion is super important concept!! Lets first understand the basics of recursion in this
Recursion - Technique section before moving forward
Understand what recursion is and how it works(Draw the recursive tree for every recursive prob
Basics you solve) Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
Print 1 to N using recursion print-1-to-n-without-using-loops-1587115620/1 Best Tutorial link - click to view Article link-click to view
Factorial of N numbers https://practice.geeksforgeeks.org/problems/factorial5739/1 Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/nth-fibonacci-number1335/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Fibonacci series using recursion ticky_on_Article Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
power-of-numbers-1587115620/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Power(x,n) Draw the recursion tree for all the probs for sure ticky_on_Article Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/print-pattern3549/1?
Print pattern page=1&category=Recursion&difficulty=Easy&sortBy=submissions Best Tutorial link - click to view Article link -click to view
https://practice.geeksforgeeks.org/problems/implement-atoi/1?
utm_source=geeksforgeeks&utm_medium=ml_Article_practice_tab&utm_
Recursive implementation of atoi campaign=Article_practice_tab Best Tutorial link - click to view Article link -click to view
https://www.geeksforgeeks.org/problems/pascal-triangle0652/1?
Pascal triangle page=1&category=Recursion&difficulty=Easy&sortBy=submissions Best Tutorial link - click to view Article link -click to view
https://leetcode.com/discuss/general-discussion/691825/
Binary Search - Algo Binary-Search-for-Beginners-Problems-or-Patterns-or-Sample-solutions
Basic pattern
https://www.geeksforgeeks.org/problems/who-will-win-1587115621/1?
Search in a sorted array(Efficiently -> So learn binary search for this) page=1&category=Binary%20Search&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
Find floor and ceil in sorted array floor-in-a-sorted-array-1587115620/1 Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
first-and-last-occurrences-of-x3116/1?
Find first and last occurence of element in sorted array page=1&category=Binary%20Search&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Find missing num from 1 to N https://leetcode.com/problems/missing-number/ Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/square-root/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Find square root ticky_on_Article Best Tutorial link - click to view Article link-click to view
https://www.codingninjas.com/studio/problems/
Search for element in infinite array search-in-infinite-sorted-0-1-array_696193 Best Tutorial link - click to view Article link-click to view
Sorted rotated array
Search element in sorted rotated array(With and without duplicate) https://leetcode.com/problems/search-in-rotated-sorted-array-ii/ Best Tutorial link - click to view Article link click to view
https://www.geeksforgeeks.org/problems/
Minimum element in sorted rotated array(With and without duplicate)A twist in normal BS is minimum-number-in-a-sorted-rotated-array-1587115620/1?
needed, once you learnt this, solve the below by yourself,even try to solve this also by yourself page=1&category=Binary%20Search&sortBy=submissions Best Tutorial link - click to view Article link click to view
https://www.geeksforgeeks.org/problems/rotation4723/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Number of times array is sorted ticky_on_Article Best Tutorial link - click to view Article link click to view
Maximum element in sorted rotated array Best Tutorial link - click to view Article link click to view
Biotonic array
https://www.geeksforgeeks.org/problems/peak-element/1?
page=1&category=Arrays&difficulty=Medium&status=solved&sortBy=subm
Find the peak element issions Best Tutorial link - click to view Article link click to view
Search element in biotonic array https://www.interviewbit.com/problems/search-in-bitonic-array/ Best Tutorial link - click to view Article link click to view
Matrix
https://www.geeksforgeeks.org/problems/
binary-matrix-having-maximum-number-of-1s--170647/1?
Find row with maximum number of 1's page=2&category=Binary%20Search&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
search-in-a-matrix-1587115621/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Search in row wise column wise sorted matrix ticky_on_Article Best Tutorial link - click to view Article link-click to view
Search in sorted matrix II https://leetcode.com/problems/search-a-2d-matrix-ii/ Best Tutorial link - click to view Article link-click to view
Find peak in sorted matrix https://leetcode.com/problems/find-a-peak-element-ii/ Best Tutorial link - click to view Article link-click to view
Application(Super imp) Article link-click to view
https://www.geeksforgeeks.org/problems/aggressive-cows/1?
Aggressive cows page=1&category=Binary%20Search&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
allocate-minimum-number-of-pages0937/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Allocate minimum pages ticky_on_Article Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
the-painters-partition-problem1535/1?
Painter partition page=1&category=Binary%20Search&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
split-array-largest-sum--141634/1?
Split array largest sum page=2&category=Binary%20Search&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://leetcode.com/problems/
Minimum num of days to make m bouquets minimum-number-of-days-to-make-m-bouquets/ Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
capacity-to-ship-packages-within-d-days/1?
Capacity to ship packages within D days page=2&category=Binary%20Search&sortBy=submissions Best Tutorial link - click to view Article link-click to view
koko eating bananas https://leetcode.com/problems/koko-eating-bananas/ Best Tutorial link - click to view Article link-click to view
kth smallest number in matrix multiplication table https://leetcode.com/problems/kth-smallest-number-in-multiplication-table/ Best Tutorial link - click to view Article link-click to view
kth smallest pair distance https://leetcode.com/problems/find-k-th-smallest-pair-distance/ Best Tutorial link - click to view Article link-click to view
Ugly number II https://leetcode.com/problems/ugly-number-ii/ Best Tutorial link - click to view Article link-click to view
Median of 2 sorted arrays Median of 2 Sorted Arrays of Different Sizes | Practice | GeeksforGeeks Best Tutorial link - click to view Article link-click to view
Find smallest divisor given threshold Find the Smallest Divisor Given a Threshold - LeetCode Best Tutorial link - click to view Article link-click to view
Sorting - Algo Make sure to completely understand the algo thoroughly, and time & space complexity
https://www.geeksforgeeks.org/problems/bubble-sort/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Basics Bubble sort(very basic sorting technique) ticky_on_Article Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/selection-sort/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Selection sort ticky_on_Article Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/insertion-sort/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Insertion sort ticky_on_Article Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/merge-sort/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Merge sort ticky_on_Article Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/quick-sort/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Quick sort ticky_on_Article Best Tutorial link - click to view Article link-click to view
LinkedList - Data structure
Completely understand how Node in linkedList is represented and then go ahead with the
Basic patterns patterns Best Tutorial link - click to view Article link-click to view
Create, Insert, Delete Operations in LL Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
Search for an element in LL(Once create, insert is done, this should be easy) search-in-linked-list-1664434326/1 Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/reverse-a-linked-list/1?
Reverse a LL(Learn the O space approach, learn recursive & iterative soln) page=1&category=Linked%20List&sortBy=submissions Best Tutorial link - click to view Article link - click to view
https://www.geeksforgeeks.org/problems/check-if-linked-list-is-pallindrome/
Check if LL is a Palindrome(Once reversing is learnt, this should be easy) 1?page=1&category=Linked%20List&sortBy=submissions Best Tutorial link - click to view Article link - click to view
https://www.geeksforgeeks.org/problems/insert-in-middle-of-linked-list/1?
Middle element of LL (Learn efficient approach) page=2&category=Linked%20List&sortBy=submissions Best Tutorial link - click to view Article link - click to view
https://www.geeksforgeeks.org/problems/
intersection-point-in-y-shapped-linked-lists/1?
Find the intersection point of Y LL(Once you know traversal, apply node logic to solve this) page=1&category=Linked%20List&sortBy=submissions Best Tutorial link - click to view Article link - click to view
https://www.geeksforgeeks.org/problems/union-of-two-linked-list/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Union and Intersection of LL ticky_on_Article Best Tutorial link - click to view Article link - click to view
https://www.geeksforgeeks.org/problems/delete-without-head-pointer/1?
Delete without head pointer page=1&category=Linked%20List&sortBy=submissions Best Tutorial link - click to view Article link - click to view
https://www.geeksforgeeks.org/problems/
count-pairs-whose-sum-is-equal-to-x/1?
Count pairs with given sum page=2&category=Linked%20List&sortBy=submissions Best Tutorial link - click to view Article link - click to view
https://www.geeksforgeeks.org/problems/
Reverse LL in groups of given size(Once you learn reverse of LL's efficient approach, you can try reverse-a-linked-list-in-groups-of-given-size/1?
this) page=1&category=Linked%20List&sortBy=submissions Best Tutorial link - click to view Article link - click to view
Loop
https://www.geeksforgeeks.org/problems/detect-loop-in-linked-list/1?
Detect loop in LL(Once this is learnt, all the loop pattern probs below should be easy) page=1&category=Linked%20List&sortBy=submissions Best Tutorial link - click to view Article link - click to view
https://www.geeksforgeeks.org/problems/find-length-of-loop/1?
Find length of loop in LL page=1&category=Linked%20List&difficulty=Easy&sortBy=submissions Best Tutorial link - click to view Article link - click to view
https://www.geeksforgeeks.org/problems/
Find the starting point of loop find-the-first-node-of-loop-in-linked-list--170645/1 Best Tutorial link - click to view Article link - click to view
https://www.geeksforgeeks.org/problems/remove-loop-in-linked-list/1?
Remove the loop page=1&category=Linked%20List&sortBy=submissions Best Tutorial link - click to view Article link - click to view
Sorting, Merging & Related
https://www.geeksforgeeks.org/problems/
given-a-linked-list-of-0s-1s-and-2s-sort-it/1?
Sort 0s, 1s, 2s in LL page=1&category=Linked%20List&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
pairwise-swap-elements-of-a-linked-list-by-swapping-data/1?
Pairwise swap elements page=2&category=Linked%20List&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Merge k sorted LL(Merge two sorted is easy version of this ques, if you are finding it diff to come https://www.geeksforgeeks.org/problems/merge-two-sorted-linked-lists/1?
up with logic, first solve that) page=1&category=Linked%20List&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/sort-a-linked-list/1?
Merge sort in LL page=2&category=Linked%20List&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/quick-sort-on-linked-list/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Quick sort in LL ticky_on_Article Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/remove-duplicate-element-from-so
Remove occurence of duplicates in sorted & unsorted LL https://www.geeksforgeeks.org/problems/remove-duplicates-from-an-unsort Best Tutorial link - click to view Article link-click to view
https://practice.geeksforgeeks.org/problems/
Seggregate even and odd nodes in LL segregate-even-and-odd-nodes-in-a-linked-list5035/1 Best Tutorial link - click to view Article link-click to view
Arithmetic(Reversal & traversal - Once
you learnt these, you can solve probs
in this pattern)
https://practice.geeksforgeeks.org/problems/
Add 1 to a number represented as LL add-1-to-a-number-represented-as-linked-list/1 Best Tutorial link - click to view Article link-click to view
https://practice.geeksforgeeks.org/problems/
Add 2 numbers represented as LL add-two-numbers-represented-by-linked-lists/1 Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/subtraction-in-linked-list/1?
Subtraction on LL(Comes under hard but should be solvable once the above ones are solved) page=1&category=Linked%20List&difficulty=Hard&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Must solve other probs(Try to solve
these probs on own, brute force atleast
you can come up for most of them
after solving above)
https://www.geeksforgeeks.org/problems/reorder-list/1?
Rotate LL page=3&category=Linked%20List&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
flattening-a-linked-list--170645/1?
Flattening a LL(make sure to learn the efficient approach) page=4&category=Linked%20List&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://practice.geeksforgeeks.org/problems/
Delete nodes having greater value on right delete-nodes-having-greater-value-on-right/1 Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
delete-n-nodes-after-m-nodes-of-a-linked-list/1?
Delete N nodes after M nodes page=3&category=Linked%20List&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Delete all occurence of node Best Tutorial link - click to view
https://www.geeksforgeeks.org/problems/
clone-a-linked-list-with-next-and-random-pointer/1?
Clone a LL page=1&category=Linked%20List&difficulty=Hard&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
length-of-longest-palindrome-in-linked-list/1?
Length of longest palindrome in LL page=2&category=Linked%20List&difficulty=Medium&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Learn the basics of circular LL Best Tutorial link - click to view Article link-click to view
Double Linked List
Learn the basic representation of the nodes in LL Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/reverse-a-doubly-linked-list/1?
Insert, Delete, Reverse DLL page=1&category=doubly-linked-list&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
find-pairs-with-given-sum-in-doubly-linked-list/1?
Pairs with given sum in DLL page=1&category=doubly-linked-list&difficulty=Easy&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Stack - Data structure
Basic
https://www.geeksforgeeks.org/problems/implement-stack-using-array/1?
What is stack? Leam how to represent the data structure and working of it page=1&category=Stack&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
implement-two-stacks-in-an-array/1?
Implement 2 stack using array page=1&category=Stack&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/parenthesis-checker2744/1?
Check for balanced paranthesis page=1&category=Stack&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
get-minimum-element-from-stack/1?
Get min from stack in O(1) space and time page=1&category=Stack&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Next greater element
https://www.geeksforgeeks.org/problems/
next-larger-element-1587115620/1?
Next greater element page=1&category=Stack&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Next greater element II https://leetcode.com/problems/next-greater-element-ii/ Best Tutorial link - click to view Article link-click to view
Next smallest element(Once above
pattern is covered, try to solve this on
own)
https://www.geeksforgeeks.org/problems/help-classmates--141631/1?
Next smallest element on left itm_source=geeksforgeeks Best Tutorial link - click to view Article link-click to view
https://www.codingninjas.com/studio/problems/
Next smallest element on right next-smaller-element_1112581 Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
Stock span problem(Implementation prob - Try to figure out the pattern from above next greater stock-span-problem-1587115621/1?
and smaller) page=1&category=Stack&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
trapping-rain-water-1587115621/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Trapping rainwater ticky_on_Article Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
Maximum rectangular area on histogram(Once next greater and next smallest pattern is covered, maximum-rectangular-area-in-a-histogram-1587115620/1?
this can be solved easily) page=1&category=Stack&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/max-rectangle/1?
Max rectangle(Same as above, just a small twist) page=1&category=Stack&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Expressions
https://www.geeksforgeeks.org/problems/infix-to-postfix-1587115620/1?
Infix to postfix page=2&category=Stack&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
evaluation-of-postfix-expression1735/1?
Evaluation of postfix expression page=2&category=Stack&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Prefix to postfix https://practice.geeksforgeeks.org/problems/infix-to-postfix-1587115620/1 Best Tutorial link - click to view Article link-click to view
https://www.codingninjas.com/studio/problems/
Arithmetic expression evaluation arithmetic-expression-evaluation_1170517 Best Tutorial link - click to view Article link-click to view
Reversing stack
https://www.geeksforgeeks.org/problems/
insert-an-element-at-the-bottom-of-a-stack/1?
Insert at bottom of stack page=4&category=Stack&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/reverse-a-stack/1?
Reverse a stack page=2&category=Stack&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/sort-a-stack/1?
Sort stack(Solving above two can give you hint for this) page=1&category=Stack&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Implementation probs
https://www.geeksforgeeks.org/problems/the-celebrity-problem/1?
Celebrity problem page=1&category=Stack&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
restrictive-candy-crush--141631/1?
Restrictive candy crush page=2&category=Stack&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/count-the-reversals0401/1?
Count the reversals page=1&category=Queue&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Queue - Data structure
Basic pattern
https://www.geeksforgeeks.org/problems/implement-queue-using-array/1?
What is queue? Learn the basic representation and how its implemented? page=1&category=Queue&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
implement-queue-using-linked-list/1?
Implement queue using linkedlist page=1&category=Queue&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/queue-using-two-stacks/1?
Implement queue using stack(super imp) page=1&category=Queue&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/stack-using-two-queues/1?
Implement stack using queue(super imp) page=1&category=Queue&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/queue-reversal/1?
Reverse a queue page=1&category=Queue&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Implementation probs
https://www.geeksforgeeks.org/problems/circular-tour-1587115620/1?
Circular tour page=1&category=Queue&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
first-non-repeating-character-in-a-stream1216/1?
First non repeating char in stream page=1&category=Queue&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
reverse-first-k-elements-of-queue/1?
Reverse first k elements in queue page=1&category=Queue&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/lru-cache/1?
LRU Cache(super imp) page=1&category=Queue&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
minimum-cost-of-ropes-1587115620/1?
Minimum cost of ropes page=1&category=Queue&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/nearly-sorted-1587115620/1?
Nearly sorted(Learn priority queue for sure) page=3&category=Arrays&difficulty=Medium Best Tutorial link - click to view Article link-click to view
https://leetcode.com/problems/find-all-anagrams-in-a-string/solutions/
Sliding Window - Technique 92007/
(Dont skip this topic, I personally have been GeekForGeeks has very limited probs in this topics, so use leetcode for this even if you practice sliding-window-algorithm-template-to-solve-all-the-leetcode-substring-sear
asked this topic in many interviews on gfg generally ch-problem/
Fixed Sliding Window(Size of the
window will be provided)
https://www.geeksforgeeks.org/problems/
max-sum-subarray-of-size-k5313/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Maximum sum subarray of size k ticky_on_Article Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
Count distinct element in every window(Once you understoor handling window size fixed from count-distinct-elements-in-every-window/1?
above prob, this will be easy) page=1&category=sliding-window&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
First negative integer in every window of size k(Try to solve on own before looking for soln since first-negative-integer-in-every-window-of-size-k3345/1?
you did above topics too already page=1&category=sliding-window&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
maximum-of-all-subarrays-of-size-k3101/1?
Maximum of all subarray of size k(Try to solve on own) page=1&category=sliding-window&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
substrings-of-length-k-with-k-1-distinct-elements/1?
Count substring of length k with k-1 distinct elements page=1&category=sliding-window&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
maximum-of-minimum-for-every-window-size3453/1?
Maximum of minimum for every window(Imp) page=1&category=sliding-window&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Variable sliding window (Each prob will
teach something in addition to the window so
do solve everything)
https://www.geeksforgeeks.org/problems/
subarray-with-given-sum-1587115621/1?
Subarray with given sum page=1&category=sliding-window&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
longest-sub-array-with-sum-k0809/1?
Longest subarray with given sum k(Same as above with slight modification) page=1&category=sliding-window&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
subarray-with-0-sum-1587115621/1?
Subarray with 0 sum page=1&category=sliding-window&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/smallest-distant-window3132/1?
Smallest window of distinct elements page=1&category=sliding-window&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
smallest-window-containing-0-1-and-2--170637/1?
Smallest window containing 0,1,2 page=2&category=sliding-window&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
smallest-window-in-a-string-containing-all-the-characters-of-another-string-
Smallest window in string containing all chars of another string 1587115621/1?page=1&category=sliding-window&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
length-of-the-longest-substring3036/1?
Length of longest substring page=1&category=sliding-window&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/largest-subarray-of-0s-and-1s/1?
Largest subarray of 0s and 1s page=1&category=sliding-window&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
count-occurences-of-anagrams5839/1?
Count of anagram occurence(Super imp) page=1&category=sliding-window&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Max consecutive ones III https://leetcode.com/problems/max-consecutive-ones-iii/ Best Tutorial link - click to view Article link-click to view
Fruit into basket https://leetcode.com/problems/fruit-into-baskets Best Tutorial link - click to view Article link-click to view
Count number of nice subarrays https://leetcode.com/problems/count-number-of-nice-subarrays/ Best Tutorial link - click to view Article link-click to view
Longest repeating char replacement https://leetcode.com/problems/longest-repeating-character-replacement Best Tutorial link - click to view
Minimum window substring https://leetcode.com/problems/minimum-window-substring/description/ Best Tutorial link - click to view Article link-click to view
Minimum window subsequence(Understand the diff between subarray and subsequence before
starting this prob) https://leetcode.com/problems/minimum-window-subsequence/ Best Tutorial link - click to view Article link-click to view
Subarray with k diff integers https://leetcode.com/problems/subarrays-with-k-different-integers/ Best Tutorial link - click to view Article link-click to view
Trees - Data structure
Traversals Understand the basic of how tree data structure is represented Best Tutorial link - click to view
https://www.geeksforgeeks.org/problems/preorder-traversal/1?
PreOrder Traversal page=1&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/inorder-traversal/1?
InOrder Traversal page=2&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/postorder-traversal/1?
PostOrder Traversal page=2&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/level-order-traversal/1?
Level Order Traversal page=1&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
boundary-traversal-of-binary-tree/1?
Boundary Traversal(Once level traversal is learnt, this you can solve) page=1&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
print-a-binary-tree-in-vertical-order/1?
Vertical Traversal(Once level traversal is learnt, this you can solve, lil extra logic is needed) page=1&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/top-view-of-binary-tree/1?
Top View of BT(Once you have mastered level traversal, this should be easy) page=1&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/bottom-view-of-binary-tree/1?
Bottom View of BT(Once you have mastered level traversal, this should be easy) page=1&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/left-view-of-binary-tree/1?
Left View of BT(Once you have mastered vertical traversal, this should be easy) page=1&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/right-view-of-binary-tree/1?
Right View of BT(Once you have mastered vertical traversal, this should be easy) page=1&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/diagonal-traversal-of-binary-tree/
Diagonal Traversal 1?page=3&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Basic and Easy patterns(Try to solve
these once you learnt traversals)
Insert node in a tree Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/height-of-binary-tree/1?
Height of the tree page=1&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/diameter-of-binary-tree/1?
Diameter of the tree page=1&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
determine-if-two-trees-are-identical/1?
Check if 2 trees are identical page=1&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/check-if-subtree/1?
Check if subtree page=2&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/check-for-balanced-tree/1?
Check for balanced tree page=1&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
lowest-common-ancestor-in-a-binary-tree/1?
Lowest common Ancestor in BT page=1&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/sum-tree/1?
Sum tree page=1&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/symmetric-tree/1?
Symmetric tree page=2&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/mirror-tree/1?
Mirror of a tree page=1&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/check-if-tree-is-isomorphic/1?
Check if isomorphic page=2&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view

Path and Distance


https://www.geeksforgeeks.org/problems/root-to-leaf-paths/1?
Root to leaf paths page=4&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/root-to-leaf-paths/1?
Root to leaf path sum (Once the root to leaf path is solved, this should be easy) page=4&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
maximum-path-sum-from-any-node/1?
Maximum path sum from any node(Once the root to leaf path is solved, this should be easy) page=3&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/k-sum-paths/1?
K Sum Paths (Once the root to leaf path is solved, this should be easy) page=3&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
nodes-at-given-distance-in-binary-tree/1?
Nodes at given distance page=3&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Range sum of BST(Solving nodes at given distance, will make this easy) Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
min-distance-between-two-given-nodes-of-a-binary-tree/1?
Minimum distance between 2 nodes(Solving nodes at given distance, will make this easy) page=2&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
maximum-difference-between-node-and-its-ancestor/1?
Maximum distance between node and ancestor(Must solve though distance pattern is covered) page=3&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/burning-tree/1?
Min time to burn a tree(Using distance logic, this can be sovled) page=4&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Binary Search Tree(Once the above
patterns are covered, BST probs will
become easy, but make sure to learn
what BST is in general before starting
with probs) Understand what BST is? Best Tutorial link - click to view
Insert a node in BST https://leetcode.com/problems/insert-into-a-binary-search-tree/ Best Tutorial link - click to view Article link-click to view
Search a value in BST(Learn efficient algo to do it, since this can be handled efficiently in BST
than BT) https://practice.geeksforgeeks.org/problems/search-a-node-in-bst/1 Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
max-and-min-element-in-binary-tree/1?
Find minimum and maximum in BST page=5&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Find the Kth largest element/kth Smallest in BST(Try to solve it without looking for soln, once you https://www.geeksforgeeks.org/problems/kth-largest-element-in-bst/1?
have mastered all the above patterns, this should be easy) page=2&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/check-for-bst/1?
Check for BST(Try solving probs in this pattern by yourself till LCA once above are solved) page=1&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/find-the-closest-element-in-bst/
Find the closest element in BST 1?page=3&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
count-bst-nodes-that-lie-in-a-given-range/1?
Count BST nodes in the given range page=3&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/largest-bst/1?
Largest BST in BT(Super imp - Must solve) page=2&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
lowest-common-ancestor-in-a-bst/1?
Lowest Common Ancestor in BST page=1&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/merge-two-bst-s/1?
Merge two BST(Super imp - Must solve) page=4&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/predecessor-and-successor/1?
Inorder successor and predecessor page=2&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
populate-inorder-successor-for-all-nodes/1?
Populate inorder successor for all nodes page=5&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to vieww
https://www.geeksforgeeks.org/problems/bst-to-greater-sum-tree/1?
BST to greater sum tree page=8&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Delete given node from BST https://leetcode.com/problems/delete-node-in-a-bst/ Best Tutorial link - click to view Article link-click to view
Construct from given
Construct Binary Tree from Preorder and Inorder Traversal ( First understand the concept of how https://www.geeksforgeeks.org/problems/construct-tree-1/1?
to derive at the solution, then start coding it by yourself) page=1&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://leetcode.com/problems/
Construct Binary Tree from Inorder and Postorder Traversal construct-binary-tree-from-inorder-and-postorder-traversal/ Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
construct-tree-from-preorder-traversal/1?
Construct BST from given preorder traversal page=7&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
construct-binary-tree-from-parent-array/1?
Construct BT from parent array page=5&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Subtree & Other must do tree probs
https://www.geeksforgeeks.org/problems/
serialize-and-deserialize-a-binary-tree/1?
Serialize and deserialize BT page=4&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/largest-subtree-sum-in-a-tree/1?
Largest subtree sum in a tree page=6&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
maximum-sum-of-non-adjacent-nodes/1?
Maximum sum of non adjacent nodes page=3&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/duplicate-subtrees/1?
Duplicate subtree page=4&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/flatten-binary-tree-to-linked-list/
Flatten BT to linked list 1?page=5&category=Tree&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://leetcode.com/discuss/general-discussion/680269/
Backtracking & Recursion This is super imp topic before moving further!! Draw the recursion tree to understand the a-general-approach-to-backtracking-problems-in-cexhaustive-
advanced - Technique flow as the first step, this will help in visualization of the flow searching
Basic patterns and must solve(Each
prob in this pattern will teach you
something and also as you solve, you
will start mastering it though initially it
takes sometime) Understand the basics of backtracking and start solving
https://www.geeksforgeeks.org/problems/
permutations-of-a-given-string2041/1?
Permutations of a string page=1&category=Backtracking&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Permutation II (You can solve on own once you solve above) https://leetcode.com/problems/permutations-ii Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
combination-sum-1587115620/1?
Combination sum I page=1&category=Backtracking&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Combination sum II(Once you solve combination I, you should be able to solve this and below 2
probs too easily) https://leetcode.com/problems/combination-sum-ii Best Tutorial link - click to view Article link-click to view
Combination sum III https://leetcode.com/problems/combination-sum-iii Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/rat-in-a-maze-problem/1?
Rat in maze(Once above probs are solved, you can do this easily) page=1&category=Backtracking&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
possible-words-from-phone-digits-1587115620/1?
Possible words from phone digits page=1&category=Backtracking&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/subsets-1613027340/1?
Subsets page=1&category=Backtracking&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/subsets-1587115621/1?
Unique subset(Solving above, you will be able to solve this easily) page=1&category=Backtracking&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/n-queen-problem0315/1?
N-Queen(Super imp) page=1&category=Backtracking&sortBy=submissions Best Tutorial link - click to view Article link-click to view
N Queen II https://leetcode.com/problems/n-queens-ii
https://www.geeksforgeeks.org/problems/permutation-with-spaces3627/1?
Permutation with spaces page=1&category=Backtracking&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
generate-all-possible-parentheses/1?
Generate parantheses page=1&category=Backtracking&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/generate-ip-addresses/1?
Generate IP address page=1&category=Backtracking&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
solve-the-sudoku-1587115621/1?
Solve the sudoku page=1&category=Backtracking&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/find-kth-permutation/1?
kth permutation page=2&category=Backtracking&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/word-search/1?
Word search page=3&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
find-all-possible-palindromic-partitions-of-a-string/1?
Palindrome partition of string page=2&category=Backtracking&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/decode-the-string2444/1?
Decode the string page=1&category=Backtracking&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Letter case permutation https://leetcode.com/problems/letter-case-permutation/ Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/sum-string3151/1?
sum string page=1&category=Backtracking&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/word-boggle4143/1?
word boggle page=1&category=Backtracking&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
largest-number-in-k-swaps-1587115620/1?
Largest number in k swaps page=1&category=Backtracking&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/partition-array-to-k-subsets/1?
Partition array to k subsets page=1&category=Backtracking&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Most of the probs in this topics can be solved once you learn first couple of probs in each pattern https://leetcode.com/discuss/general-discussion/655708/
Graphs - Data structure of this topics graph-for-beginners-problems-pattern-sample-solutions/
Traversals & Basic Understand how graph is represented? Best Tutorial link - click to view
https://www.geeksforgeeks.org/problems/bfs-traversal-of-graph/1?
BFS Traversal(Super imp and basic) page=1&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/depth-first-traversal-for-a-graph/
DFS Traversal(Super imp and basic) 1?page=1&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/detect-cycle-in-a-directed-graph/
Detect cycle in Directed graph 1?page=1&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
detect-cycle-in-an-undirected-graph/1?
Detect cycle in Undirected graph page=1&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/negative-weight-cycle3504/1?
Detect Negative cycle in graph page=2&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Connected component(After traversal,
this will be easy to solve)
Connected component(Once you master this , all the below using this pattern will become super https://practice.geeksforgeeks.org/problems/
easy) strongly-connected-component-tarjanss-algo-1587115621/1 Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/number-of-provinces/1?
Number of Provinces(Learn how to solve this prob and solve the below in this pattern) page=2&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/find-the-number-of-islands/1?
Number of Islands page=1&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/number-of-distinct-islands/1?
Number of distinct island page=2&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/find-number-of-closed-islands/1?
Number of closed island page=3&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Bipartite
https://www.geeksforgeeks.org/problems/bipartite-graph/1?
Bipartite graph page=1&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://practice.geeksforgeeks.org/problems/
M-colouring m-coloring-problem-1587115620/1 Best Tutorial link - click to view Article link-click to view
https://www.codingninjas.com/studio/problems/
Shortest Path Find shortest path in UG(Once you learn this, try to solve other probs in this pattern by yourself) shortest-path-in-an-unweighted-graph_981297 Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
shortest-path-in-undirected-graph/1?
Find shortest path in DAG page=1&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
implementing-dijkstra-set-1-adjacency-matrix/1?
Djikstra Algo page=1&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/steps-by-knight5927/1?
Step by Knight page=1&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
shortest-source-to-destination-path3544/1?
Shortest path source to destiny page=1&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/find-whether-path-exist5238/1?
Find if path exists page=2&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/covid-spread--141631/1?
Covid spread page=4&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/minimum-cost-path3833/1?
Minimum cost path page=2&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/word-ladder/1?
Word ladder I page=3&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/word-ladder-ii/1?
Word ladder II page=3&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
implementing-floyd-warshall2042/1?
Floyd warshal algo page=1&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
distance-from-the-source-bellman-ford-algorithm/1?
Bellmanford algo(Imp - Will be used for negative cycle) page=2&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Multi Source
https://www.geeksforgeeks.org/problems/flood-fill-algorithm1856/1?
Flood fill page=1&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/replace-os-with-xs0052/1?
Replace O's with X's(Below can be solved easily in this pattern once you learnt flood fill) page=1&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
length-of-largest-region-of-1s-1587115620/1?
Unit area of largest region of 1s page=2&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/rotten-oranges2536/1?
Rotten Oranges page=1&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Topological sort
https://www.geeksforgeeks.org/problems/topological-sort/1?
Topological sort algo(Learning this algo, will make you solve all the probs in this pattern) page=1&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/prerequisite-tasks/1?
Prerequisite tasks page=2&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/course-schedule/1?
Course schedule I page=3&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Course schedule II https://leetcode.com/problems/course-schedule-ii Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/eventual-safe-states/1?
Eventual safe states page=2&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/alien-dictionary/1?
Alien dictionary page=1&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Minimum Spanning Tree
Minimum spanning tree(Once you learn this, then you will be able to solve the probs in this https://www.geeksforgeeks.org/problems/minimum-spanning-tree/1?
pattern by yourself) page=1&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.codingninjas.com/studio/problems/
Kruskals algo code-kruskal-s-algorithm_6320 Best Tutorial link - click to view Article link-click to view
Minimum cost to connect cities https://leetcode.com/problems/connecting-cities-with-minimum-cost Best Tutorial link - click to view Article link-click to view
Minimum cost to connect all points https://leetcode.com/problems/min-cost-to-connect-all-points/ Best Tutorial link - click to view Article link-click to view
Optimize water distribution https://leetcode.com/problems/optimize-water-distribution-in-a-village Best Tutorial link - click to view Article link-click to view
Disjoint set
Learn the disjoint set Algo Best Tutorial link - click to view Article link-click to view
Union by rank, path compression(Super imp, dont skip) Best Tutorial link - click to view Article link-click to view
https://leetcode.com/problems/
Networks connected number-of-operations-to-make-network-connected/ Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/minimum-swaps/1?
Minimum swaps to sort page=1&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/santa-banta2814/1?
Santa Banta page=3&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/number-of-pairs-1645358985/1?
Number of pairs page=5&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Number of Island II https://leetcode.com/problems/number-of-islands-ii/ Best Tutorial link - click to view Article link-click to view
Making a large island https://leetcode.com/problems/making-a-large-island Best Tutorial link - click to view Article link-click to view
Must solve imp algos
https://www.geeksforgeeks.org/problems/bridge-edge-in-graph/1?
Bridges in graph page=3&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/articulation-point-1/1?
Articulation point page=3&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/critical-connections/1?
Critical connection page=5&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
strongly-connected-components-kosarajus-algo/1?
Kosaraja algo (Strongly connected component algo) page=2&category=Graph&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Word boggle https://www.geeksforgeeks.org/problems/word-boggle4143/1? Best Tutorial link - click to view Article link-click to view
Word boggle II https://www.geeksforgeeks.org/problems/word-boggle-ii--141631/1? Best Tutorial link - click to view Article link-click to view
Greedy - Technique
Basics and must solves
https://www.geeksforgeeks.org/problems/
minimum-number-of-jumps-1587115620/1?
Minimum number of jumps page=1&category=Greedy&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/find-optimum-operation4504/1?
Minimum operations page=1&category=Greedy&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
minimize-the-sum-of-product1525/1?
Minimize the sum of product page=1&category=Greedy&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/largest-number-possible5028/1?
Largest number possible page=1&category=Greedy&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/lemonade-change/1?
Lemonade change page=2&category=Greedy&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/activity-selection-1587115620/1?
Activity selection prob(Super imp) page=1&category=Greedy&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
n-meetings-in-one-room-1587115620/1?
N meetings in a room(Super imp) page=1&category=Greedy&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
minimum-platforms-1587115620/1?
Minimum platforms page=1&category=Greedy&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/minimize-the-heights-i/1?
Minimize the height page=2&category=Greedy&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/
Minimum number of coins using greedy(This can be solved using naive, DP also but make sure problems/-minimum-number-of-coins4426/1?
to use greedy here) page=1&category=Greedy&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
job-sequencing-problem-1587115620/1?
Job sequencing prob page=1&category=Greedy&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
fractional-knapsack-1587115620/1?
Fractional knapsack page=1&category=Greedy&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/jump-game/1?
Jump game page=2&category=Greedy&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Insert interval https://leetcode.com/problems/insert-interval/ Best Tutorial link - click to view Article link-click to view
Merge interval https://leetcode.com/problems/merge-intervals/ Best Tutorial link - click to view Article link-click to view
Non overlapping interval https://leetcode.com/problems/non-overlapping-intervals/ Best Tutorial link - click to view Article link-click to view
https://practice.geeksforgeeks.org/problems/
Minimum cost of ropes minimum-cost-of-ropes-1587115620/1 Best Tutorial link - click to view Article link-click to view
Partition labels https://leetcode.com/problems/partition-labels/ Best Tutorial link - click to view Article link-click to view
Cinema seat allocation https://leetcode.com/problems/cinema-seat-allocation/ Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/max-length-chain/1?
Max length chain page=1&category=Greedy&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://leetcode.com/problems/
Valid parantheses - Minimum minimum-add-to-make-parentheses-valid/ Best Tutorial link - click to view Article link-click to view
Shortest job first https://practice.geeksforgeeks.org/problems/shortest-job-first/1 Best Tutorial link - click to view Article link-click to view
Least recently used https://practice.geeksforgeeks.org/problems/lru-cache/1?utm_source=youtuBest Tutorial link - click to view Article link-click to view
DP is super crucial topic and very commonly asked in many interviews!! One major thing you
need to know is, dont start with tabulation approach directly, thats wrong way to learn DP. First
Dynamic Programming - find the solution using recursion, then memoization and then finally tabulation and space https://leetcode.com/discuss/general-discussion/662866/
Technique reduction in tabulation. dp-for-beginners-problems-patterns-sample-solutions
Basic
Understand the basics!! Best Tutorial link - click to view Article link-click to view
1D - Linear DP
https://www.geeksforgeeks.org/problems/
count-number-of-hops-1587115620/1?
Count num of hops page=2&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
count-ways-to-reach-the-nth-stair-1587115620/1?
Count way to reach nth stair(Order matters) page=2&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
count-ways-to-nth-stairorder-does-not-matter5639/1?
Count way to reach nth stair(Order doesn't matter) page=4&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
House robber https://leetcode.com/problems/house-robber/ Article link-click to view
House robber II https://leetcode.com/problems/house-robber-ii/ Best Tutorial link - click to view Article link-click to view
2D Grid DP Article link-click to view
https://www.geeksforgeeks.org/problems/count-the-paths4332/1?
Count paths - grid page=5&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Unique paths II https://leetcode.com/problems/unique-paths-ii/ Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
Count all possible paths with condition(You can solve this by yourself once above two are count-all-possible-paths-from-top-left-to-bottom-right3011/1?
solved) page=3&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Minimum path sum in grid https://leetcode.com/problems/minimum-path-sum/ Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/path-in-matrix3805/1?
Max path sum page=2&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Minimum path sum in triangular grid https://leetcode.com/problems/triangle/ Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
number-of-paths-in-a-matrix-with-k-coins2728/1?
Number of paths with k coins page=7&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Minimum/Maximum falling path sum https://leetcode.com/problems/minimum-falling-path-sum Best Tutorial link - click to view Article link-click to view
Minimum falling path sum II https://leetcode.com/problems/minimum-falling-path-sum-ii Best Tutorial link - click to view Article link-click to view
DP on subsequence
https://www.geeksforgeeks.org/problems/
subset-sum-problem-1611555638/1?
page=1&category=Dynamic%20Programming&status=solved&sortBy=sub
Subset sum problem missions Best Tutorial link - click to view Article link - click to view
https://www.geeksforgeeks.org/problems/perfect-sum-problem5633/1?
Count subset with given sum k page=1&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link - click to view
https://www.geeksforgeeks.org/problems/subset-sum-problem2014/1?
Partition equal subset sum(Try to do it on own after solving above two, just a small trick) page=1&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/minimum-sum-partition3317/1?
Minimum sum partition page=2&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Count partition with given diff Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/0-1-knapsack-problem0945/1?
0-1 Knapsack page=1&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
max-sum-without-adjacents2430/1?
Maximum non adjacent subsequence page=3&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/coin-change2448/1?
Coin change page=1&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/number-of-coins1824/1?
Min number of coins page=2&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/rod-cutting0840/1?
page=2&category=Dynamic%20Programming&status=solved&sortBy=sub
Rod cutting missions Best Tutorial link - click to view Article link-click to view
Target sum https://leetcode.com/problems/target-sum Best Tutorial link - click to view

https://www.geeksforgeeks.org/problems/minimum-cost-to-fill-given-weight
Minimum cost to fill given weight in bag(Solving the above probs in this pattern will make this -in-a-bag1956/1?page=3&category=Dynamic%20Programming&status=
super easy) solved&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
knapsack-with-duplicate-items4201/1?
Knapsack with duplication items page=2&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
DP on Increasing subsequence Article link-click to view
Longest increasing subsequence https://leetcode.com/problems/longest-increasing-subsequence/ Best Tutorial link - click to view Article link-click to view
Print longest increasing subsequence Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
Longest bitonic subsequence(Solve on own, definitely you can do it once the above two are longest-bitonic-subsequence0824/1?
solved) page=4&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Longest divisible subset(This and the below are just extended version of longest increasing
subsequence, so try on own https://leetcode.com/problems/largest-divisible-subset/ Best Tutorial link - click to view Article link-click to view
Longest string chain https://leetcode.com/problems/longest-string-chain/ Best Tutorial link - click to view Article link-click to view
https://leetcode.com/problems/
Num of longest increasing subsequence number-of-longest-increasing-subsequence/ Best Tutorial link - click to view Article link-click to view
DP on strings(Using Longest common
subsequence pattern)
https://www.geeksforgeeks.org/problems/
Longest common subsequence(Once you learn this pattern, all probs under this pattern can be longest-common-subsequence-1587115620/1?
solved by yourself) page=1&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/print-all-lcs-sequences3413/1?
Print Longest common subsequence(Here you will need to print the string so must solve) page=7&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Longest palindromic subsequence https://leetcode.com/problems/longest-palindromic-subsequence Best Tutorial link - click to view Article link-click to view
https://leetcode.com/problems/
Form a palindrome with minimum insertions minimum-insertion-steps-to-make-a-string-palindrome Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
minimum-number-of-deletions-and-insertions0209/1?
Min num of deletions and insertions to make string s1 equal to s2 page=4&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
shortest-common-supersequence0322/1?
Shortest common supersequence page=2&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
longest-common-substring1452/1?
Longest common substring/subarray page=1&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
longest-palindrome-in-a-string3411/1?
Longest palindromic substring page=1&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
longest-repeating-subsequence2004/1?
page=2&category=Dynamic%20Programming&status=solved&sortBy=sub
Longest repeating subsequence missions Best Tutorial link - click to view Article link-click to view
DP on string
https://www.geeksforgeeks.org/problems/edit-distance3702/1?
Edit distance (All the probs in this pattern are super imp, each prob is different so do solve all) page=1&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/distinct-occurrences/1?
page=3&category=Dynamic%20Programming&status=solved&sortBy=sub
Distinct occurence missions Best Tutorial link - click to view
https://www.geeksforgeeks.org/problems/wildcard-pattern-matching/1?
Wildcard pattern matching page=4&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
longest-valid-parentheses5657/1?
Longest valid parentheses page=3&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/word-break1352/1?
Word break page=3&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/word-break-part-23249/1?
Word break II page=5&category=Dynamic%20Programming&sortBy=submissions Article link-click to view
https://www.geeksforgeeks.org/problems/word-wrap1646/1?
Word wrap page=4&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/interleaved-strings/1?
Interleaved strings page=3&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
DP on stocks(Was asked in one of my
interview too, so dont miss any ques
from this pattern)
Best time to buy and sell stock https://leetcode.com/problems/best-time-to-buy-and-sell-stock/ Best Tutorial link - click to view Article link-click to view
Best time to buy and sell stock II(Once you solve the above prob, all probs in this pattern are extenhttps://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/ Best Tutorial link - click to view Article link-click to view
Best time to buy and sell stock III https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii/ Best Tutorial link - click to view Article link-click to view
Best time to buy and sell stock IV https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iv/ Best Tutorial link - click to view Article link-click to view
https://leetcode.com/problems/
Best time to buy and sell stock with cooldown best-time-to-buy-and-sell-stock-with-cooldown/ Best Tutorial link - click to view Article link-click to view
https://leetcode.com/problems/
Best time to buy and sell stock with transaction fee best-time-to-buy-and-sell-stock-with-transaction-fee/ Best Tutorial link - click to view Article link-click to view
DP on partition and MCM
https://www.geeksforgeeks.org/problems/
Matrix chain multiplication(Quite tricky pattern, every prob is diff and teaches something so do matrix-chain-multiplication0303/1?
solve all) page=2&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Minimum cost to cut stick https://leetcode.com/problems/minimum-cost-to-cut-a-stick/ Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/burst-balloons/1?
Burst balloons page=8&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
boolean-parenthesization5610/1?
Boolean Parenthesization page=3&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/palindromic-patitioning4845/1?
Palindrom partitioning page=2&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Partition array for max sum https://leetcode.com/problems/partition-array-for-maximum-sum/ Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/max-rectangle/1?
Max rectangles area with all 1s page=3&category=Dynamic%20Programming&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Count square submatrices https://leetcode.com/problems/count-square-submatrices-with-all-ones/ Best Tutorial link - click to view Article link-click to view
Heaps - Data structure
Basic patterns
What is heap? Understand the data structure Best Tutorial link - click to view Article link-click to view
Min heap implementation Min Heap Implementation - Coding Ninjas Best Tutorial link - click to view Article link-click to view
Max heap implementation https://www.gatevidyalay.com/tag/max-heap-questions/ Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
Convert min heap to max heap convert-min-heap-to-max-heap-1666385109/1 Best Tutorial link - click to view Article link-click to view
Top k pattern
https://www.geeksforgeeks.org/problems/k-largest-elements4206/1?
kth largest in array page=1&category=Heap&sortBy=submissions Best Tutorial link - click to view Article link-click to view
kth smallest in array Best Tutorial link - click to view Article link-click to view
Top k frequent elements https://leetcode.com/problems/top-k-frequent-elements/ Best Tutorial link - click to view Article link-click to view
Top k frequent words https://leetcode.com/problems/top-k-frequent-words Best Tutorial link - click to view Article link-click to view
Frequency sort https://leetcode.com/problems/sort-characters-by-frequency/ Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
kth-largest-element-in-a-stream2220/1?
kth largest num in streams page=1&category=Heap&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Reorganize string https://leetcode.com/problems/reorganize-string/ Best Tutorial link - click to view Article link-click to view
Reorganize string k distance apart https://leetcode.com/problems/rearrange-string-k-distance-apart Best Tutorial link - click to view Article link-click to view
https://leetcode.com/problems/
kth smallest sum of matrix find-the-kth-smallest-sum-of-a-matrix-with-sorted-rows/ Best Tutorial link - click to view Article link-click to view
ugly num II https://leetcode.com/problems/ugly-number-ii/ Best Tutorial link - click to view Article link-click to view
Merge k sorted pattern
Merge k sorted array https://practice.geeksforgeeks.org/problems/merge-k-sorted-arrays/1 Best Tutorial link - click to view Article link-click to view
k pairs with smallest sum https://leetcode.com/problems/find-k-pairs-with-smallest-sums/ Best Tutorial link - click to view Article link-click to view
k smallest nums in M sorted list https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix/ Best Tutorial link - click to view Article link-click to view
Two heaps pattern
https://www.geeksforgeeks.org/problems/
find-median-in-a-stream-1587115620/1?
Find median from data stream page=1&category=Heap&sortBy=submissions Best Tutorial link - click to view Article link-click to view
Sliding window median https://leetcode.com/problems/sliding-window-median/ Best Tutorial link - click to view Article link-click to view
Maximum capital/IPO https://leetcode.com/problems/ipo/ Best Tutorial link - click to view Article link-click to view
Minimum number pattern
https://practice.geeksforgeeks.org/problems/
Minimum cost to connect ropes minimum-cost-of-ropes-1587115620/1 Best Tutorial link - click to view Article link-click to view
Meeting room II https://leetcode.com/problems/meeting-rooms-ii Best Tutorial link - click to view Article link-click to view
Minimum cost to hire k workers https://leetcode.com/problems/minimum-cost-to-hire-k-workers/ Best Tutorial link - click to view Article link-click to view
Minimum num of CPU https://leetcode.com/problems/task-scheduler/ Best Tutorial link - click to view Article link-click to view
Minimum num of refueling stops https://leetcode.com/problems/minimum-number-of-refueling-stops/ Best Tutorial link - click to view Article link-click to view
Trie - Data structure
Basic and must solve
Implement Trie from scratch https://www.codingninjas.com/studio/problems/implement-trie_631356 Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/word-break-trie--141631/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Word break (Do solve it using trie, though you had solved this already) ticky_on_Article Best Tutorial link - click to view Article link-click to view
Longest string with all prefixes https://leetcode.com/problems/longest-common-prefix/ Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/
maximum-xor-of-two-numbers-in-an-array/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Maximum XOR of two numbers in array ticky_on_Article Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/unique-rows-in-boolean-matrix/
1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Unique rows in boolean matrix ticky_on_Article Best Tutorial link - click to view Article link-click to view
Prefix match with other strings https://www.geeksforgeeks.org/problems/prefix-match-with-other-strings/1 Best Tutorial link - click to view Article link-click to view
Most of the imp problems in strings involves diff techniques, algos which are already
String covered. In this section, we will focus on string specific imp probs and algos
Must solve and Algos specific to string
Implement Atoi https://www.geeksforgeeks.org/problems/implement-atoi/1 Best Tutorial link - click to view Article link-click to view
Count and say https://leetcode.com/problems/count-and-say/ Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/count-the-reversals0401/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Minimum bracket reversals ticky_on_Article Best Tutorial link - click to view Article link-click to view
https://practice.geeksforgeeks.org/problems/
Rabin karp algo( Pattern searching, super imp, this was infact asked in one of my interview) search-pattern-rabin-karp-algorithm--141631/1 Best Tutorial link - click to view Article link-click to view
https://www.codingninjas.com/studio/problems/
Boyer moor algo (Pattern searching) boyer-moore-algorithm-for-pattern-searching_1115634 Best Tutorial link - click to view Article link-click to view
KMP algo ( Longest prefix suffix, super imp) https://practice.geeksforgeeks.org/problems/longest-prefix-suffix2527/1 Best Tutorial link - click to view Article link-click to view
Longest happy prefix https://www.geeksforgeeks.org/longest-prefix-also-suffix/ Best Tutorial link - click to view Article link-click to view
Remove all adjacent duplicates https://leetcode.com/problems/remove-all-adjacent-duplicates-in-string/ Best Tutorial link - click to view Article link-click to view
Hashing in strings https://www.geeksforgeeks.org/practice-problems-on-hashing/ Best Tutorial link - click to view Article link-click to view
Print all anagrams https://leetcode.com/problems/group-anagrams/ Best Tutorial link - click to view Article link-click to view
https://practice.geeksforgeeks.org/problems/
Z - Function search-pattern-z-algorithm--141631/1 Best Tutorial link - click to view Article link-click to view
Shortest palindrome Shortest Palindrome - LeetCode Best Tutorial link - click to view Article link-click to view
Circle of strings https://www.geeksforgeeks.org/problems/circle-of-strings4530/1 Best Tutorial link - click to view Article link-click to view
https://www.geeksforgeeks.org/problems/roman-number-to-integer3201/1?
itm_source=geeksforgeeks&itm_medium=Article&itm_campaign=bottom_s
Roman numerals to decimals ticky_on_Article Best Tutorial link - click to view Article link-click to view

There are couple of more topics, bit manipulation, segment trees and AVL trees which has limited number of probs, so do check that out if you have good amount of time still left
Checkout this for bit tricks - https://leetcode.com/discuss/general-discussion/1073221/All-about-Bitwise-Operations-Beginner-Intermediate

Leetcode Article for behavioural


rounds https://leetcode.com/discuss/interview-experience/1532708/tips-for-answering-few-tricky-behavioural-interview-questions
Leetcode Article for major
patterns https://leetcode.com/discuss/general-discussion/665604/Important-and-Useful-links-from-all-over-the-LeetCode
Resume standard template https://www.overleaf.com/Articles/ravi-kukretis-resume/cxprrkxbccgb
Try to solve atleast 5+ problems per day to master it at the earliest

You might also like