Pre-Placements Checklist: Data Structures
Pre-Placements Checklist: Data Structures
Pre-Placements Checklist: Data Structures
Data Structures:
1. Array
a. Kadane's Algorithm
https://www.geeksforgeeks.org/largest-sum-contiguous-subarray/
b. N/2, N/3 greatest Number
https://leetcode.com/problems/majority-element/
https://leetcode.com/problems/majority-element-ii/
https://www.geeksforgeeks.org/given-an-array-of-of-size-n-finds-all-the-
elements-that-appear-more-than-nk-times/
c. Merge overlapping intervals
https://leetcode.com/problems/merge-intervals/
d. Rotate matrix
https://leetcode.com/problems/rotate-image/
e. Buy / Sell stocks - I, II, III: https://leetcode.com/problems/best-time-to-
buy-and-sell-stock/
2. String
a. Pattern matching algorithms (KMP + Rabin Karp)
https://www.geeksforgeeks.org/kmp-algorithm-for-pattern-searching/
https://www.geeksforgeeks.org/rabin-karp-algorithm-for-pattern-
searching/
b. Using StringBuilder class -> Add, Multiply Strings
https://www.geeksforgeeks.org/stringbuilder-class-in-java-with-
examples/
https://www.geeksforgeeks.org/stringbuilder-append-method-in-java-
with-examples/
3. LinkedList
a. Implementation of Linkedlist
https://www.geeksforgeeks.org/implementing-a-linked-list-in-java-
using-class/
https://leetcode.com/problems/design-linked-list/
b. Detect cycle in a linkedlist - Floyd Algo
https://leetcode.com/problems/linked-list-cycle/
c. Reverse a linked list + reverse in groups
https://leetcode.com/problems/reverse-linked-list/
https://leetcode.com/problems/reverse-nodes-in-k-group/
4. Stack
a. Implementation of Stack
https://www.geeksforgeeks.org/stack-data-structure-introduction-
program/
https://www.geeksforgeeks.org/stack-class-in-java/
b. Balance parenthesis
https://leetcode.com/problems/valid-parentheses/
c. Trapping rain water
https://leetcode.com/problems/trapping-rain-water/
d. Implement min stack
https://leetcode.com/problems/min-stack/
5. Queue
a. Implementation of Queue + Deque
https://www.geeksforgeeks.org/queue-set-1introduction-and-array-
implementation/
https://www.geeksforgeeks.org/queue-interface-java/
https://www.geeksforgeeks.org/implementation-deque-using-circular-
array/
https://www.geeksforgeeks.org/deque-interface-java-example/
6. PriorityQueue or Heap
a. Implementation of Heap Data structure
https://www.geeksforgeeks.org/heap-data-structure/
b. Connect n ropes with min cost: https://www.geeksforgeeks.org/connect-
n-ropes-minimum-cost/
c. Median of running stream:
https://www.geeksforgeeks.org/median-of-stream-of-running-integers-
using-stl/
d. LRU and LFU cache
https://leetcode.com/problems/lru-cache/
https://leetcode.com/problems/lfu-cache/
10. Graph
a. Implementation, BFS and DFS traversals
https://www.geeksforgeeks.org/graph-and-its-representations/
https://www.geeksforgeeks.org/breadth-first-search-or-bfs-for-a-graph/
https://www.geeksforgeeks.org/depth-first-search-or-dfs-for-a-graph/
b. Topological sorting
https://www.geeksforgeeks.org/topological-sorting/
c. Bellman ford Algorithm
https://www.geeksforgeeks.org/bellman-ford-algorithm-dp-23/
d. Dijkstra's Algorithm
https://www.geeksforgeeks.org/dijkstras-shortest-path-algorithm-
greedy-algo-7/
e. Prim's Algorithm
https://www.geeksforgeeks.org/prims-minimum-spanning-tree-mst-
greedy-algo-5/
f. Kruskal's Algorithm
https://www.geeksforgeeks.org/kruskals-minimum-spanning-tree-
algorithm-greedy-algo-2/
g. Unique Islands Problem: https://www.geeksforgeeks.org/find-the-
number-of-distinct-islands-in-a-2d-matrix/
11. Trie
a. Implementation
https://www.geeksforgeeks.org/trie-insert-and-search/
12. Segment Trees : More important in CP
a. Implementation
https://www.hackerearth.com/practice/data-structures/advanced-data-
structures/segment-trees/tutorial/
Algorithms:
6. Binary Searching
a. Find upper and lower bound using Binary search
https://www.geeksforgeeks.org/find-first-and-last-positions-of-an-
element-in-a-sorted-array/
b. Allocate books: https://www.interviewbit.com/problems/allocate-books/
7. Greedy Programming
a. Candy distribution: https://www.interviewbit.com/problems/distribute-candy/
b. Gas station: https://www.interviewbit.com/problems/gas-station/
c. Fractional Knapsack
https://www.geeksforgeeks.org/fractional-knapsack-problem/
8. Dynamic Programming
a. 0/1 Knapsack: https://www.youtube.com/watch?v=y6kpGJBI7t0
b. Longest increasing subsequence
https://leetcode.com/problems/longest-increasing-subsequence/
c. Matrix chain multiplication
https://www.geeksforgeeks.org/matrix-chain-multiplication-dp-8/
d. Coin change problem
https://leetcode.com/problems/coin-change/