Following problems are chosen based on concepts involved in solving them, which will accelerate your thought process and help you further to solve several similar problems asked in a coding interview. There might be multiple approaches discussed solving few problems. We recommend going through each one of them.
Array:
Find a pair with the given sum in an array
Maximum Sum Subarray Problem (Kadane’s Algorithm)
Longest Increasing Subsequence Problem
Backtracking:
Find the longest possible route in a matrix
Find all permutations of a string in C++ (Using Backtracking and STL)
Trees:
Find the next node at the same level as the given node in a binary tree
Print left view of a binary tree
Find the diameter of a binary tree
In-place convert a binary tree to a doubly-linked list
Find ancestors of a given node in a binary tree
Deletion from BST (Binary Search Tree)
Divide & Conquer:
Find the first or last occurrence of a given number in a sorted array
Maximum Subarray Sum using Divide and Conquer
Dynamic Programming:
Longest Common Subsequence Problem
Longest Palindromic Substring Problem
Word Break Problem – Dynamic Programming
BFS/DFS:
Breadth-First Search (BFS) – Iterative and Recursive Implementation
Depth First Search (DFS) – Iterative and Recursive Implementation
Find the shortest path from source to destination in a matrix that satisfies given constraints
Find all occurrences of the given string in a character matrix
Matrix:
Find all paths from the first cell to the last cell of a matrix
Find maximum sum submatrix present in a matrix
Heap:
Merge M sorted lists each containing N elements
Find k’th largest element in an array
Linked List:
Thanks for reading.
To share your code in the comments, please use our online compiler that supports C, C++, Java, Python, JavaScript, C#, PHP, and many more popular programming languages.
Like us? Refer us to your friends and support our growth. Happy coding :)