Here is a website on good algorithms and technical interviews.
Here are some good features I found on this:
1. Many problems are explained with the help of videos which makes it very easy to understand the problem within minutes.
2. The Algorithm Visualization on the page is a great feature provided for visualizing how an algorithm works at runtime for a given example. Normally it takes careful observation to dry run a code, but through the algorithm visualization given here, it becomes easier to understand.
For example, check out the visualization given here:
Create a balanced Binary Search Tree from a sorted array
Here are videos on various topics:
Programming Interview Questions
Here are some of the good problems:
Linked Lists and Stack Problems:
Reverse a Linked List – Recursive
Reverse a Linked List – Iterative
Reverse every alternate k nodes of a Linked List
Find nth Node from the end of a Linked List
Sum of Two Linked Lists using Stacks
Sum of Two Linked Lists using Recursion | Set 1
Detect a loop in a linked list and find the node where the loop starts.
Convert a sorted Doubly Linked List to Balanced Binary Search Tree
Convert a binary tree to doubly linked list
Find intersection of two Linked Lists
Find intersection of two Linked Lists – O(m + n) Time Complexity and O(1) Space Complexity
Strings Problems:
Remove spaces from a given string
Longest Substring with non-Repeating Characters
Check balanced parentheses in a string
Group all anagrams together from a given array of strings | Set 1
First non-repeating character in a string
Find all permutations of a String
Minimum number of trials to reach from source word to destination word
Longest Palindromic Subsequence
To print maximum number of As using given four keys.
Finding 10 letter repeated DNA sequences.
Find minimum edit distance between given two strings
Distinct binary strings of length n with no consecutive 1s
The longest prefix suffix array computation in KMP pattern matching algorithm.
The Knuth Morris Pratt algorithm for pattern matching.
Arrays Problems:
Sorting Algorithm – Selection Sort
Sorting Algorithm – Insertion Sort
Sorting Algorithm – Bubble Sort
Merge two sorted arrays without using extra space
Maximum average subarray of size k
Longest Substring with non-Repeating Characters
Find Minimum Length Sub Array With Sum K
Binary Search in a Sorted Array
Re-arrange elements in an array to put positive and negative elements in alternate order
Find the next greater number using same digits
Next greater element in an array
First non-repeating character in a string
Find the ‘n’th most frequent number in array
Find the missing number in the increasing sequence
Find duplicates in an integer array
Find common elements in ‘n’ sorted arrays
Find a Peak Element in an array
Count frequencies of array elements in range 1 to n
Find all permutations of a String
Find pivot in a sorted rotated array
Find an element in a sorted rotated array
Find element in sorted rotated array without finding pivot
Find index of 0 to replace to get longest continuous sequence of 1s
O(n) time approach to find index of 0 to replace to get longest continuous sequence of 1s
Trapping Rain Water between Towers
Minimum number of coins to make change
Find minimum cost path in a matrix
Find the length of longest increasing subsequence in an array
Longest Increasing Subsequence O(n logn)
Find the length of longest bitonic subsequence in an array
Find an integer array corresponding to the string specifying increase-decrease transitions
Find median of two sorted arrays
Find Majority Element in an Array
Count all possible decodings of a given digit sequence
Find total number of ways to make change using given set of coins
Find increasing sub-sequence of length three having maximum product
Find increasing sub-sequence of length three having maximum product | Optimized approach
Set Partition Problem | Recursion
Set Partition Problem | Dynamic Programming
Trees and Graphs Problems:
Pre-order Traversal of a Binary Tree
Post-order Traversal of a Binary Tree
In-order Traversal of a Binary Tree
Binary Tree Level Order Traversal
Spiral Level Order Traversal of a Binary Tree | Set 1
Print right view of a binary tree
Print all nodes of a binary tree that do not have sibling
Print all Root to Leaf paths of a Binary Tree
Minimum Depth of a Binary Tree
Print left view of a binary tree
Find sum of all left leaves of a binary tree
Find depth of deepest odd level leaf node
Check whether a binary tree is a full binary tree or not
Check whether a binary tree is complete or not
Check if two nodes are cousins in a Binary tree
Check if two binary trees are identical
Check if all internal nodes of BST have only one child without building tree
Convert the given n-ary tree to its mirror image
Convert a binary tree to its mirror tree
Print top view of a binary tree
Print top view of a binary tree using level order traversal
Print bottom view of a binary tree
Print bottom view of a binary tree using level order traversal
Remove the nodes of binary search tree which are outside the given range
Remove all nodes which lie on path having sum less than k
Remove all the half nodes from a given binary tree
Print binary tree in vertical order
Populate right neighbors for all nodes in a binary tree
Lowest Common Ancestor of two nodes in a Binary Search Tree
In-order Successor of a Node in a Binary Tree
Recover a Binary Search Tree if positions of two nodes are swapped.
Find floor and ceiling of an element from given dataset using binary search tree
Diagonal Sum of a Binary Tree.
Create a balanced Binary Search Tree from a sorted array
Convert a sorted Doubly Linked List to Balanced Binary Search Tree
Convert a binary tree to doubly linked list
Check if a binary tree is balanced or not
Check if a binary tree is a binary search tree
Check if two binary search trees are identical given their array representations | Set 2
Check if two binary search trees are identical given their array representations
Check if a binary tree is sub-tree of another binary tree in time O(n)
Check if a binary tree is sub-tree of another binary tree in space O(1)
Binary Search tree | Insertion and Search
Check if a given binary tree is symmetric tree or not
Check if the given n-ary tree is symmetric tree or not
Total number of possible Binary Search Trees with ‘n’ keys
Find the size of largest BST in a binary tree
Lowest Common Ancestor of 2 nodes in a Binary Tree
Find height of the binary tree from its parent array representation
Convert binary tree to binary search tree
Construct the binary tree from its parent array representation
Construct binary tree from inorder and preorder traversals
Construct binary tree from inorder and postorder traversals
Trie Data Structure | Insert and search
Longest Prefix Matching using Trie
Given a sequence of words, group together all anagrams and print them.
Serialize and Deserialize a binary search tree
Serialize and Deserialize a binary search tree using post order traversal
Breadth first search in a graph
Topological Sorting of a Directed Acyclic Graph.
Minimum number of trials to reach from source word to destination word
Friend Circles Problem – Graph Theory
Dijkstra’s Shortest Path algorithm
Dynamic Programming Problems:
Total number of possible Binary Search Trees with ‘n’ keys
Minimum number of trials to reach from source word to destination word
Minimum number of coins to make change
Find minimum cost path in a matrix
Longest Palindromic Subsequence
Find the length of longest increasing subsequence in an array
Longest Increasing Subsequence O(n logn)
Find the length of longest bitonic subsequence in an array
To print maximum number of As using given four keys.
Find minimum edit distance between given two strings
Distinct binary strings of length n with no consecutive 1s
Count all possible decodings of a given digit sequence
Find total number of ways to make change using given set of coins
Set Partition Problem | Dynamic Programming