Top 30 Data Structures Problems for Technical Interview Preparation
Below problems were picked based on concepts involved in solving them.
Array:
Find pair with given sum in the array
Maximum subarray problem (Kadane’s algorithm)
Longest Increasing Subsequence
Backtracking:
Find Longest Possible Route in a Matrix
Find all Permutations of a given string
Trees:
Find next node in same level for given node in a binary tree
Print left view of binary tree
Find diameter of a binary tree
In-place convert convert given Binary Tree to Doubly Linked List
Find ancestors of given node in a Binary Tree
Divide & Conquer:
Find first or last occurrence of a given number in a sorted array
Maximum Sum Subarray using Divide & Conquer
Dynamic Programming:
Longest Common Subsequence | Introduction & LCS Length
Longest Palindromic Substring (Non-DP Space Optimized Solution)
BFS/DFS
Breadth First Search (BFS) | Iterative & Recursive Implementation
Minimum number of throws required to win Snake and Ladder game
Depth First Search (DFS) | Iterative & Recursive Implementation
Find Shortest path from source to destination in a matrix that satisfies given constraints
Find all occurrences of given string in a character matrix
Matrix:
Find all paths from first cell to last cell of a matrix
Find maximum sum submatrix present in a given matrix
Heap:
Merge M sorted lists each containing N elements
Find K’th largest element in an array
Linked List:
Merge given sorted linked lists into one
Link to all problems: List of Problems — Techie Delight