Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Contains all important data structure and algorithms problems asked in interviews

NotificationsYou must be signed in to change notification settings

scott9344/InterviewRoom

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

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

Collections CheetSheet

Collection TypeGet (Access)Add (Insert)RemoveContainsNotes / Use Cases
ArrayListO(1)O(n)O(n)O(n)Fast access, slow inserts/removals at arbitrary positions. Good for frequent read operations, infrequent modifications.
LinkedListO(n)O(1)O(1)O(n)Fast inserts/removals, slow random access. Use when frequent insertions/deletions are expected, but random access is less important.
HashSetN/AO(1)O(1)O(1)Fast set operations. No defined order. No duplicates allowed.
LinkedHashSetN/AO(1)O(1)O(1)Fast set operations. Maintains insertion order. No duplicates allowed.
TreeSetO(log n)O(log n)O(log n)O(log n)Sorted set. Useful for maintaining sorted order.
HashMapO(1)O(1)O(1)O(1)Fast map operations. Keys are unique.
LinkedHashMapO(1)O(1)O(1)O(1)Fast map operations. Maintains insertion order.
TreeMapO(log n)O(log n)O(log n)O(log n)Sorted map. Useful for maintaining sorted keys.
PriorityQueueO(1)O(log n)O(log n)N/AEfficient priority queue (min-heap).
ArrayDequeO(1)O(1)O(1)N/ADouble-ended queue. Efficient for adding/removing at both ends.

Array

IDPROBLEM STATEMENTPROBLEM LINK
1Missing number in arrayLeetcode ,GFG
2Subarray with given sumGFG
32 SumLeetCode ,InterviewBit,GFG ,
4Majority ElementLeetCode ,InterviewBit ,GFG
5Max Consecutive OnesLeetCode ,InterviewBit
6Sort an array of 0s, 1s and 2sGFG ,LeetCode
7Spiral MatrixLeetCode ,InterviewBit
8Find the duplicate numberLeetCode
9Largest number formed from an arrayLeetCode ,InterviewBit,GFG
10Next PermutationLeetCode ,InterviewBit
11Merge Overlapping IntervalsLeetCode ,InterviewBit,GFG
12First Missing PositiveLeetCode ,InterviewBit

LinkedList

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

Stack

IDPROBLEM STATEMENTPROBLEM LINK
1Valid ParenthesesLeetCode
2Length of longest valid ParenthesesLeetCode
3Next Greater ElementGFG ,LeetCode
4Nearest Smaller ElementInterviewBit
5Trapping Rain WaterLeetCode ,InterviewBit
6Largest Rectangle in a HistogramLeetCode ,InterviewBit
7Min StackLeetCode ,InterviewBit

Queue

IDPROBLEM STATEMENTPROBLEM LINK
1Generate binary numbers from 1 to nGFG
2Minimum time required to rot all OrangesGFG ,LeetCode
3First non repeating character in a streamGFG
4Circular tourGFG ,LeetCode
5Sliding Window MaximumLeetCode ,InterviewBit

Binary Tree

IDPROBLEM STATEMENTPROBLEM LINK
1Determine Height of a binary treeLeetCode ,InterviewBit
2Inorder TraversalInterviewBit
3Preorder TraversalInterviewBit
4Postorder TraversalInterviewBit
5Level Order TraversalLeetCode
6Level Order Traversal in Spiral FormLeetCode ,InterviewBit
7Left and Right View of Binary TreeLeetCode
8Diameter of a Binary treeLeetCode
9Populating Next Right Pointers in Each NodeLeetCode ,InterviewBit
10Check if a Binary Tree is Sum TreeGFG
11Check if a Binary Tree is BalancedLeetCode ,InterviewBit
12Check if a Binary Tree is BSTGFG
13Convert a given Binary Tree into its mirror TreeGFG
14Check if two Binary Tree are mirror image of each otherGFG
15Check if a Binary Tree is Symmetric Binary TreeInterviewBit ,LeetCode
16Invert a Binary TreeInterviewBit ,LeetCode
17Vertical order TraversalInterviewBit
18Top View Of Binary TreeGFG
19Bottom View of Binary TreeGFG
20Check if Root to Leaf path sum existInterviewBit ,LeetCode
21All Root to Leaf path sumInterviewBit ,LeetCode
22Maximum path sum from leaf to leafGFG
23Maximum path sum from any node to any nodeLeetCode
24Least Common AncestorLeetCode
25Find the distance between two nodes of a Binary TreeGFG

Binary Search Tree

IDPROBLEM STATEMENTPROBLEM LINK
1Insert a Node in BSTLeetCode
2Delete a Node from BSTLeetCode
3Lowest common ancestor in BSTLeetCode
4Inorder Successor in BSTLeetCode
5Kth Smallest node in BSTLeetCode

Heap and Priority Queue

IDPROBLEM STATEMENTPROBLEM LINK
1Median in a stream of integersGFG
2Top K Frequent Elements in an ArrayLeetCode
3Kth Largest Element in a StreamLeetCode
4Sort a nearly sorted (or K sorted) arrayGFG
5Kth Smallest Element in a Sorted MatrixLeetCode

Algorithms

Binary Search

IDPROBLEM STATEMENTPROBLEM LINK
1Find First and Last Position of Element in Sorted ArrayLeetCode
2Search in Rotated Sorted ArrayLeetCode ,InterviewBit ,GFG
3Find Minimum in Rotated Sorted ArrayLeetCode
4Pow(x,n)LeetCode ,InterviewBit
5Sqrt(n)LeetCode ,InterviewBit
6Matrix SearchLeetCode ,InterviewBit
6Median of Two Sorted ArraysLeetCode ,InterviewBit

Dynamic Programming

IDPROBLEM STATEMENTPROBLEM LINK
1Climbing StairsLeetCode
2Coin Sum InfiniteInterviewBit
3Min Cost Climbing StairsLeetCode
4Rod Cutting ProblemGFG
5Longest Common SubsequenceLeetCode
6Print Longest Common SubsequenceHackerrank
7Longest Increasing SubsequenceLeetCode ,InterviewBit
8Edit DistanceLeetCode
9Longest Common SubstringLeetCode
10Maximum Sum Contiguous SubarrayLeetCode
11Maximum Sum without adjacent Element(House Robber)LeetCode
12Maximum Product SubarrayLeetCode
13Find minimum number of coins that make a given valueLeetCode
14Min Cost PathInterviewBit
15Maximal RectangleLeetCode ,InterviewBit
16Minimum Jump to reach EndLeetCode ,InterviewBit
170 - 1 Knapsack ProblemGFG
18Partition Equal Subset SumLeetCode
19Longest Palindromic SubsequenceLeetCode
20Longest Bitonic SubsequenceInterviewBit
21Word BreakLeetCode ,InterviewBit
22Interleaving StringLeetCode ,InterviewBit
23Matrix Chain MultiplicationLeetCode
24Palindrome PartitioningLeetCode

Graph

IDPROBLEM STATEMENTPROBLEM LINK
1Region in Binary MatrixInterviewBit ,GFG
2Rotting OrangesLeetCode ,GFG
3Number of IslandsLeetCode ,GFG
4Find whether path existInterviewBit ,GFG
5Cycle in Undirected GraphInterviewBit ,GFG
6Cycle in Directed GraphInterviewBit ,LeetCode
7Topological SortLeetCode
8Snakes and LaddersLeetCode ,InterviewBit
9Alien DictionaryGFG
10Word SearchLeetCode ,InterviewBit
11Word Search 2LeetCode ,GFG
12Word LadderInterviewBit ,LeetCode

About

Contains all important data structure and algorithms problems asked in interviews

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp