Skip to content

Contains all important data structure and algorithms problems asked in interviews

Notifications You must be signed in to change notification settings

ashuray/InterviewRoom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

Interview Preparation

You can crack any Interview if you are preparing yourself in a well organised manner. There are lots of Data Structure and Algorithm problems on internet and it is quite impossible for a person to practice all of them. So it is really important that you practice a list of few problems which are really important and covers almost every concepts.

I have tried my best to sort all those problems for you and ordered them as well. I hope if you follow my list and study in the same order in which i have given, it will surely help you prepare very well for the Job Interview in your 2 months vacation.

Table of Contents

Data Structures

Array

ID PROBLEM STATEMENT PROBLEM LINK
1 Missing number in array Leetcode , GFG
2 Subarray with given sum GFG
3 2 Sum LeetCode , InterviewBit, GFG ,
4 Majority Element LeetCode , InterviewBit , GFG
5 Max Consecutive Ones LeetCode , InterviewBit
6 Sort an array of 0s, 1s and 2s GFG , LeetCode
7 Spiral Matrix LeetCode , InterviewBit
8 Find the duplicate number LeetCode
9 Largest number formed from an array LeetCode , InterviewBit, GFG
10 Next Permutation LeetCode , InterviewBit
11 Merge Overlapping Intervals LeetCode , InterviewBit, GFG
12 First Missing Positive LeetCode , InterviewBit

LinkedList

ID PROBLEM STATEMENT PROBLEM LINK
1 Find middle element in a linked list LeetCode , GFG
2 Remove n'th node from end of a linked list LeetCode , InterviewBit
3 Intersection Point in Y shaped linked list LeetCode , InterviewBit
4 Reverse a linked list LeetCode , InterviewBit
5 Check if a linked list is Palindrome LeetCode , InterviewBit
6 Rotate a LinkedList LeetCode , InterviewBit
7 Reverse linked list in a group of given size k LeetCode , InterviewBit
8 Detect and Remove Loop in a linked list LeetCode , InterviewBit
9 Find length of the Loop in a linked list GFG
10 Segregate even and odd positioned nodes in a linked list LeetCode , GFG
11 Segregate even and odd valued nodes in a linked list GFG
12 Clone a linked list with next and random pointer LeetCode , GFG
13 Reorder List L1->L2->...Ln to L1->Ln->L2->Ln-1.... LeetCode , InterviewBit
14 Delete N nodes after M nodes of a linked list GFG
15 Merge K sorted list LeetCode , InterviewBit , GFG
16 Add two numbers represented by a linked list LeetCode , InterviewBit

Stack

ID PROBLEM STATEMENT PROBLEM LINK
1 Valid Parentheses LeetCode
2 Length of longest valid Parentheses LeetCode
3 Next Greater Element GFG , LeetCode
4 Nearest Smaller Element InterviewBit
5 Trapping Rain Water LeetCode , InterviewBit
6 Largest Rectangle in a Histogram LeetCode , InterviewBit
7 Min Stack LeetCode , InterviewBit

Queue

ID PROBLEM STATEMENT PROBLEM LINK
1 Generate binary numbers from 1 to n GFG
2 Minimum time required to rot all Oranges GFG , LeetCode
3 First non repeating character in a stream GFG
4 Circular tour GFG , LeetCode
5 Sliding Window Maximum LeetCode , InterviewBit

Binary Tree

ID PROBLEM STATEMENT PROBLEM LINK
1 Determine Height of a binary tree LeetCode , InterviewBit
2 Inorder Traversal InterviewBit
3 Preorder Traversal InterviewBit
4 Postorder Traversal InterviewBit
5 Level Order Traversal LeetCode
6 Level Order Traversal in Spiral Form LeetCode , InterviewBit
7 Left and Right View of Binary Tree LeetCode
8 Diameter of a Binary tree LeetCode
9 Populating Next Right Pointers in Each Node LeetCode , InterviewBit
10 Check if a Binary Tree is Sum Tree GFG
11 Check if a Binary Tree is Balanced LeetCode , InterviewBit
12 Check if a Binary Tree is BST GFG
13 Convert a given Binary Tree into its mirror Tree GFG
14 Check if two Binary Tree are mirror image of each other GFG
15 Check if a Binary Tree is Symmetric Binary Tree InterviewBit , LeetCode
16 Invert a Binary Tree InterviewBit , LeetCode
17 Vertical order Traversal InterviewBit
18 Top View Of Binary Tree GFG
19 Bottom View of Binary Tree GFG
20 Check if Root to Leaf path sum exist InterviewBit , LeetCode
21 All Root to Leaf path sum InterviewBit , LeetCode
22 Maximum path sum from leaf to leaf GFG
23 Maximum path sum from any node to any node LeetCode
24 Least Common Ancestor LeetCode
25 Find the distance between two nodes of a Binary Tree GFG

Binary Search Tree

ID PROBLEM STATEMENT PROBLEM LINK
1 Insert a Node in BST LeetCode
2 Delete a Node from BST LeetCode
3 Lowest common ancestor in BST LeetCode
4 Inorder Successor in BST LeetCode
5 Kth Smallest node in BST LeetCode

Heap and Priority Queue

ID PROBLEM STATEMENT PROBLEM LINK
1 Median in a stream of integers GFG
2 Top K Frequent Elements in an Array LeetCode
3 Kth Largest Element in a Stream LeetCode
4 Sort a nearly sorted (or K sorted) array GFG
5 Kth Smallest Element in a Sorted Matrix LeetCode

Algorithms

Binary Search

ID PROBLEM STATEMENT PROBLEM LINK
1 Find First and Last Position of Element in Sorted Array LeetCode
2 Search in Rotated Sorted Array LeetCode , InterviewBit , GFG
3 Find Minimum in Rotated Sorted Array LeetCode
4 Pow(x,n) LeetCode , InterviewBit
5 Sqrt(n) LeetCode , InterviewBit
6 Matrix Search LeetCode , InterviewBit
6 Median of Two Sorted Arrays LeetCode , InterviewBit

Dynamic Programming

ID PROBLEM STATEMENT PROBLEM LINK
1 Climbing Stairs LeetCode
2 Coin Sum Infinite InterviewBit
3 Min Cost Climbing Stairs LeetCode
4 Rod Cutting Problem GFG
5 Longest Common Subsequence LeetCode
6 Print Longest Common Subsequence Hackerrank
7 Longest Increasing Subsequence LeetCode , InterviewBit
8 Edit Distance LeetCode
9 Longest Common Substring LeetCode
10 Maximum Sum Contiguous Subarray LeetCode
11 Maximum Sum without adjacent Element(House Robber) LeetCode
12 Maximum Product Subarray LeetCode
13 Find minimum number of coins that make a given value LeetCode
14 Min Cost Path InterviewBit
15 Maximal Rectangle LeetCode , InterviewBit
16 Minimum Jump to reach End LeetCode , InterviewBit
17 0 - 1 Knapsack Problem GFG
18 Partition Equal Subset Sum LeetCode
19 Longest Palindromic Subsequence LeetCode
20 Longest Bitonic Subsequence InterviewBit
21 Word Break LeetCode , InterviewBit
22 Interleaving String LeetCode , InterviewBit
23 Matrix Chain Multiplication LeetCode
24 Palindrome Partitioning LeetCode

Graph

ID PROBLEM STATEMENT PROBLEM LINK
1 Region in Binary Matrix InterviewBit , GFG
2 Rotting Oranges LeetCode , GFG
3 Number of Islands LeetCode , GFG
4 Find whether path exist InterviewBit , GFG
5 Cycle in Undirected Graph InterviewBit , GFG
6 Cycle in Directed Graph InterviewBit , LeetCode
7 Topological Sort LeetCode
8 Snakes and Ladders LeetCode , InterviewBit
9 Alien Dictionary GFG
10 Word Search LeetCode , InterviewBit
11 Word Search 2 LeetCode , GFG
12 Word Ladder InterviewBit , LeetCode