EasyAlgo SDE Sheet – Top Coding Interview Problems

Document DSA-Problems

Note:

The Series doesn’t focus on any specific programming language. Instead, it emphasizes logic and uses pseudocode. The first two basic videos might use C++, but for Java tutorials, you can watch other YouTube videos. When tackling core problems of data structures and algorithms (DSA), the Series uses pseudocode that isn’t tied to any particular programming language. However, you can find code examples in your preferred language in the notes and articles provided.


Array :
0/28
Action Problems [Article, Codes] Question Link Leetcode Question Link GFG Solution Link Notes
Reverse the array Solution
find min and max elements in an array Solution
Remove Duplicates from Sorted Array Solution
Sort an array of 0's, 1's and 2's Solution
Next Permutation Solution
Find the "Kth" max and min element of an array Solution
Merge two Sorted Arrays Without Extra Space Solution
Find the Union and Intersection of the two sorted arrays. Solution
Majority Element Solution
find Largest sum contiguous Subarray [V. IMP] Solution
Kadane's Algo [V.V.V.V.V IMP] Solution
Minimise the maximum difference between heights [V.IMP] Solution
Longest Alternating Subarray Solution
Repeat and Missing Number Solution
Inversion of Array (Pre-req: Merge Sort) Solution
Majority Element (n/3 times) Solution
Reverse Pairs (Leetcode) Solution
2Sum Problem Solution
4-Sum Problem Solution
Longest Consecutive Sequence Solution
Largest Subarray with K sum Solution
Count the number of subarrays with given xor K Solution
Longest Substring without repeat Solution
Maximum profit by buying and selling a share atmost twice Solution
Trapping Rain water problem Solution
Minimum no. of operations required to make an array palindrome Solution
Smallest Subarray with sum greater than a given value Solution
Minimum swaps required bring elements less equal K together Solution
Matrix :
0/10
String :
0/25
Action Problems [Article, Codes] Question Link Leetcode Question Link GFG Solution Link Notes
Reverse Words in a String Solution
Check whether a String is Palindrome or not Solution
Longest Common Prefix Solution
Check if two strings are k-anagrams or not Solution
Check if string is rotated by two places Solution
Write a Program to check whether a string is a valid shuffle of two strings or no Solution
Implement ATOI/STRSTR Solution
Longest Common Prefix Solution
How do you print duplicate characters from a string? Solution
How do you check if a string contains only digits Solution
Find Longest Recurring Subsequence in String Solution
Print all Subsequences of a string. Solution
Print all the permutations of the given string Solution
How do you check if a given string is a palindrome? Solution
KMP algo / LPS(pi) array Solution
Count and say Solution
Rabin Karp Algo Solution
Boyer Moore Algorithm for Pattern Searching. Solution
Balanced Parenthesis problem.[Imp] Solution
Word Wrap Problem [VERY IMP]. Solution
EDIT Distance [Very Imp] Solution
Find next greater number with same set of digits. [Very Very IMP] Solution
WWord break Problem[ Very Imp] Solution
Minimum number of swaps for bracket balancing. Solution
Compare version numbers Solution
Recursion Basic Problems :
1/12
Action Problems [Article, Codes] Question Link Leetcode Question Link GFG Solution Link Notes
Print 1 to n without using loops Solution
Sum of natural numbers using recursion Solution
Remove Linked List Elements using recursion Solution
Power of Two Solution
Tail recursion to calculate sum of array elements. Solution
Program to print first n Fibonacci Numbers | Set 1 Solution
Coin Change | DP-7 Solution
Sort the Queue using Recursion Solution
Reorder List Solution
Different Ways to Add Parentheses Solution
Strobogrammatic Number Solution
K-th Symbol in Grammar Solution
Sorting :
0/15
Action Problems [Article, Codes] Question Link Leetcode Question Link GFG Solution Link Notes
Sort Colors Solution
Sort an array in waveform Solution
Check whether two Strings are anagrams of each other Solution
Sort an array of 0's, 1's and 2's Solution
Longest Harmonious Subsequence Solution
Maximum Product of Three Numbers Solution
Chocolate Distribution Problem Solution
Bubble Sort Solution
Sort an Array using merge sort Solution
Merge k Sorted Lists Solution
Sort Array By Parity II Solution
Sort Integers by The Power Value Solution
Sorting the Sentence Solution
Sort Vowels in a String Solution
Merge two sorted arrays with O(1) extra space Solution
Searching Problems :
0/20
Action Problems [Article, Codes] Question Link Leetcode Question Link GFG Solution Link Notes
Lower and Upper Bound Solution
Find first and last positions of an element in a sorted array Solution
Search Insert Position Solution
Sqrt(x) Solution
Search in a rotated sorted array Solution
First and Last occurrence of a number Solution
Maximum and minimum of an array using minimum number of comparisons Solution
Search in sorted rotated array II Solution
Searching in an array where adjacent differ by at most k Solution
Koko Eating Bananas Solution
Allocate Books Solution
Aggressive Cows Solution
Painter's partition Solution
EKOSPOJ: Solution
ROTI-Prata SPOJ Solution
Search in row wise and column wise sorted array Solution
Find Peak element II Solution
Find the inversion count Solution
DoubleHelix SPOJ Solution
linked list Problems :
0/30
Action Problems [Article, Codes] Question Link Leetcode Question Link GFG Solution Link Notes
Reverse a Linked List Solution
Print the Middle of a given linked list Solution
Reverse a Doubly Linked List Solution
Reverse a Linked List in group of Given Size. [Very Imp] Solution
Write a program to Detect loop in a linked list. Solution
Write a program to Delete loop in a linked list. Solution
Remove Duplicates in a sorted Linked List.. Solution
Remove Duplicates in a Un-sorted Linked List. Solution
Nth node from end of linked list Solution
Merge a linked list into another linked list at alternate positions Solution
Implement Queue using Linked List Solution
Implement a stack using singly linked list Solution
Remove Duplicates in a Un-sorted Linked List. Solution
Add two numbers represented by linked lists. Solution
Intersection of two Sorted Linked List. Solution
Merge Sort For Linked lists.[Very Important] Solution
Quicksort for Linked Lists.[Very Important]. Solution
Check if a linked list is a circular linked list. Solution
Split a Circular linked list into two halves.. Solution
Sort a k sorted doubly linked list Solution
Flatten a Linked List. Solution
Sort a LL of 0's, 1's and 2's. Solution
Segregate even and odd nodes in a Linked List Solution
Program for n’th node from the end of a Linked List. Solution
Reverse a sublist of linked list Solution
Partition a linked list around a given value Solution
Find the first non-repeating character from a stream of characters Solution
Multiply 2 no. represented by LL. Solution
Clone a linked list with next and random pointer Solution
Can we reverse a linked list in less than O(n) ? Solution
Stack Problems :
0/15
Queue Problems :
0/15
Tree Problems :
0/40
Action Problems [Article, Codes] Question Link Leetcode Question Link GFG Solution Link Notes
level order traversal Solution
Reverse Level Order traversal Solution
Height of a tree Solution
Diameter of a tree Solution
Binary Tree Inorder Traversal Solution
Symmetric Tree Solution
Maximum Depth of Binary Tree Solution
Binary Tree Level Order Traversal II Solution
Convert Sorted Array to Binary Search Tree Solution
Balanced Binary Tree Solution
Path Sum II Solution
Binary Tree Preorder and postorder Traversal Solution
Left nad right View of a tree Solution
Top View of a tree Solution
Bottom View of a tree Solution
Find Bottom Left Tree Value Solution
Subtree of Another Tree Solution
Merge Two Binary Trees Solution
Maximum Binary Tree Solution
SZig-Zag traversal of a binary tree Solution
Diagonal Traversal of a Binary tree Solution
Boundary traversal of a Binary tree Solution
Convert Binary tree into Doubly Linked List Solution
Find minimum swaps required to convert a Binary tree into BST Solution
Check if all leaf nodes are at same level or not Solution
Check if a Binary Tree contains duplicate subtrees of size 2 or more [ IMP ] Solution
Check if given graph is tree or not. [ IMP ] Solution
Find LCA in a Binary tree Solution
Kth Ancestor of node in a Binary tree Solution
Find all Duplicate subtrees in a Binary tree [ IMP ] Solution
Find a value in a BST Solution
Deletion of a node in a BST Solution
Find min and max value in a BST Solution
Find inorder successor and inorder predecessor in a BST Solution
Check if a tree is a BST or not Solution
Merge two BST [ V.V.V>IMP ] Solution
Largest BST in a Binary Tree [ V.V.V.V.V IMP ] Solution
Flatten BST to sorted list Solution
Find the median of BST in O(n) time and O(1) space Solution
Replace every element with the least greater element on its right Solution
Graph Problems :
0/35
Action Problems [Article, Codes] Question Link Leetcode Question Link GFG Solution Link Notes
Implement BFS algorithm Solution
Implement DFS Algo Solution
Detect Cycle in Directed Graph using BFS/DFS Algo Solution
flood fill algo Solution
Clone a graph Solution
Course Schedule Solution
Network Delay Time Solution
Making wired Connections Solution
Implement Topological Sort Solution
Roots of the tree having minimum height Solution
Course Schedule II Solution
Evaluate Division Solution
Find the no. of Islands Solution
Implement Kruskal’s Algorithm Solution
Implement Prim’s Algorithm Solution
Total no. of Spanning tree in a graph Solution
Implement Bellman Ford Algorithm Solution
Implement Floyd Warshall Algorithm Solution
Travelling Salesman Problem Solution
Number of squareful arrays Solution
Find the City With the Smallest Number of Neighbors at a Threshold Distance Solution
Validate Binary Tree Nodes Solution
Number of Connected Computers. Solution
Water Supply In A Village Solution
Minimum Number Of Vertices To Reach All Nodes Solution
Count Strongly connected Components(Kosaraju Algo) Solution
Find bridge in a graph Solution
Detect Negative cycle in a graph Solution
Longest path in a Directed Acyclic Graph Solution
Cheapest Flights Within K Stops Solution
Two Clique Problem Solution
Number of Triangles in a Directed and Undirected Graph Solution
Paths to travel each nodes using each edge(Seven Bridges) Solution
Water Jug problem using BFS Solution
Dynamic programming :
0/40
Action Problems [Article, Codes] Question Link Leetcode Question Link GFG Solution Link Notes
Longest Common Subsequence Solution
Shortest Common Supersequencey Solution
Longest Increasing Subsequence problem Solution
The Levenshtein distance (Edit distance) problem Solution
Matrix Chain Multiplication Solution
0–1 Knapsack problem Solution
Partition problem Solution
Rod Cutting Solution
Coin change problem Solution
Word Break Problem Solution
Binomial CoefficientProblem Solution
Permutation CoefficientProblem Solution
Subset Sum Problem Solution
Friends Pairing Problem Solution
Assembly Line SchedulingProblem Solution
Painting the Fenceproblem Solution
Maximize The Cut Segments Solution
Longest Repeated Subsequence Solution
Space Optimized Solution of LCS Solution
LCS (Longest Common Subsequence) of three strings Solution
Count all subsequences having product less than K Solution
Longest subsequence such that difference between adjacent is one Solution
Egg Dropping Problem Solution
Maximum Length Chain of Pairs Solution
Maximum size square sub-matrix with all 1s Solution
Min Cost PathProblem Solution
Maximum difference of zeros and ones in binary string Solution
Minimum number of jumps to reach end Solution
Minimum removals from array to make max –min <= K Solution
Count Balanced Binary Trees of Height h Solution
LargestSum Contiguous Subarray [V>V>V>V IMP ] Solution
Smallest sum contiguous subarray Solution
Unbounded Knapsack (Repetition of items allowed) Solution
Largest Independent Set Problem Solution
0Longest Palindromic Subsequence Solution
Longest Palindromic Substring Solution
Longest alternating subsequence Solution
Weighted Job Scheduling Solution
Count Derangements (Permutation such that no element appears in its original position) [ IMPORTANT ] Solution
Maximum profit by buying and selling a share at most twice [ IMP ] Solution
Mobile Numeric Keypad Problem [ IMP ]m Solution
Largest area rectangular sub-matrix with equal number of 1’s and 0’s [ IMP ] Solution
backtracking Problems :
0/12
Action Problems [Article, Codes] Question Link Leetcode Question Link GFG Solution Link Notes
Rat in a maze Problem Solution
Printing all solutions in N-Queen Problem Solution
Word Break Problem using Backtracking Solution
Sudoku Solver Solution
Remove Invalid Parentheses Solution
m Coloring Problem Solution
Solution
Tug of War Solution
Combinational Sum Solution
Find shortest safe route in a path with landmines Solution
Find the K-th Permutation Sequence of first N natural numbers Solution
Longest Possible Route in a Matrix with Hurdles Solution
Gready Problems :
0/20
Bits Problems :
0/7
Action Problems [Article, Codes] Question Link Leetcode Question Link GFG Solution Link Notes
Count set bits in an integer Solution
Gray Code Solution
Find the two non-repeating elements in an array of repeating elements Solution
Count number of bits to be flipped to convert A to B Solution
Power Set Solution
Copy set bits in a range Solution
Find position of the only set bit Solution
XOR Queries of a Subarray Solution
Heap Problems :
0/10

Frequently Asked Questions (FAQs)
Are these many questions enough for clearing any DSA round?
Are these many questions enough for clearing any DSA round?

Hurrah!! You are ready for your placement after some months of hard work! All the best, keep striving…

-EasyAlgo


Share the course/sheet with your friends, created with love for Suraj Ray fam.

If you find any mistakes in the sheet, it can be a wrong link as well, please fill out the google form here, our team will check it on a weekly basis, thanks.

Footer Design

Copyright © EasyAlgo All Rights Reserved