Some common Interview coding problems implemented using Java / Python
- Cracking the coding Interview 6th Edition
- Elements of Programming Interviews Java
- Quick tour of any Language
- Implement N stacks in a array
- Implement s Stack with push(), pop(), getMinimumElement() in O(1)
- Implement s Stack with push(), pop(), getMinimumElement() in O(1) Space and O(1) Time
- Implement Queue using stacks
- Write a program to sort a stack such that the smallest items are on the top
- Finding Maximum Sum Subarray (using Kadane's Algorithm)
- Counting number of Inversions in an array (using MergeSort Algorithm)
- Find the smallest window in a string containing all characters of another string (Unordered)
- Find all pairs (a, b) in an array such that a % b = k
- Dutch National Flag Problem
- Spiral Traversal of N x N Matrix
- Trapping Rain Water : Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it is able to trap after raining. (See Image Below)
- Finding Maximum and Minimum element of a Binary Search Tree
- Finding Height of a Binary Tree
- Check if a binary tree is a Binary Search Tree or not
- Deleting a node from Binary Search Tree
- Given a sorted array (ascending order) with unique integer elements, write an algorithm to create a binary search tree with minimal height
- Implement a function to check if a binary tree is balanced
- Given a BST, transform it into greater sum tree where each node contains sum of all nodes greater than that node
- Binary Tree Traversal using BFS | DFS
- Binary Tree Traversal using BFS | DFS
- Construct Binary Tree from Preorder and Inorder Traversal
- Find the Lowest Common Ancestor of a Binary Tree
- Find the K Highest elements from a Binary Search Tree
- Find the kth largest element in an unsorted array.
- Find the kth smallest element in an unsorted array.
- Find the Running Median from a Data Stream.
- Merge Sort
- Sorting array depending on the Frequency of each element
- Sorting array depending on the Frequency of each element in ascending order and if frequencies are equal, then sort the elements in ascending order
- Sorting list of Student objects depending on the marks of each student in descending order and if marks are equal, then sort them depending on their name in ascending order
- Computing the kth largest element in an array. Assume entries are distinct
- Find the only repetitive element between 1 to n-1
- Rotating a N x N Matrix by 90 Degrees
- Print a given matrix in spiral form
- Design an algorithm that takes a 2D sorted array and a number and checks whether that number appears in the array
- Program for Tower of Hanoi
- Permutations of an Array
- Print all possible words over a QWERTY keypad corresponding to a phone digits
- Print Nth Fibonacci Number
- Find the number of islands is a matrix represented by 1s and 0s
- Find length of the largest region in Matrix represented by 1s and 0s