Agenda
Array Sorting Algorithms
- Bubble sort algorithm
- Selection sort algorithm
- Insertion sort algorithm
- Merge sort algorithm
- Quick sort algorithm
Array Interview Questions
- Find a missing number in an array of distinct integers
- Find a number occurring odd number of times in array
- Dutch national flag problem
- Classify or segregate array containing even & odd numbers
- Sort an integer array containing 0 & 1
- Check if array contains duplicate elements
- Move zeros to end of array
- Reverse an integer array
- Replace every element in array by greatest number on its right
- Find maximum & minimum element in array
- Initialize & loop one, two, three dimensional array
- Create or implement stack using array
- Implement two stacks using single array
- Find missing number from array
- Second smallest element in an array of integers
- Second largest element in an array of integers
- Find maximum sum subarray using Kadaneโs algorithm
- Prime number generation using Sieve of Eratosthenes algorithm
- Union of two sorted arrays
- Intersection of two sorted arrays
- Leader element in integer array
- Majority element in integer array (Boyer Mooreโs voting algorithm)
- Search element in sorted array
- Find element in an array using binary search algorithm
- Running sum of 1d array
Single LinkedList Interview Questions
- Insert node to sorted singly linked list
- Find number of times given element exists in single linked list
- Delete all nodes of a single linked list
- Remove duplicate nodes from sorted singly linked list
- Reverse single linked list
- Reverse singly linked List in pairs
- Print single linked list in a reverse order
- Implement stack using single linked list
- Find midpoint node of single linked list
- Find nth node from end in a single linked list
- Find Intersection point of two single linked lists
- Floydโs cycle detection algorithm to check loop in single linked list
- Merge two sorted singly linked lists
Binary Tree Interview Questions
Level Order Traversal or Breadth First Search (BFS):
- Binary tree traversal
- Find level in binary tree having maximum sum
- Sum of nodes in binary tree
- Height of binary tree
- Size of binary tree
- Count non-leaf nodes (left & right child) in binary tree
- Count non leaf nodes having one child node
- Count non leaf nodes in binary tree
- Find number of leaf nodes in a binary tree
- Maximum or largest element in a binary tree
- Check leaf nodes of binary tree are at same level
- Find level of given node in binary tree
- Find maximum width of binary tree
- Spiral or Zigzag binary tree traversal
- Print binary tree in reverse order
Depth First Search Algorithm:
- Binary tree traversal algorithm
- Size of binary tree
- Diameter of binary tree
- Minimum & maximum element in binary tree
- Height of binary tree in java
- Delete all nodes of a binary tree
- Find root to leaf path sum equals given number binary tree
- Find maximum sum in root to leaf path in binary tree
- Vertical order traversal of binary tree
- Find vertical order sum in a binary tree
- Connect nodes at same level in a binary tree
- LCA (Lowest common ancestor) in a binary tree
- Print ancestors of node in a binary tree
- Print paths from root to leaf nodes in binary tree
- Print nodes at k distance from root in binary tree
- Print nodes K distance from leaf nodes in a binary tree
- Check two binary trees are equal
- Isomorphic binary tree
- Quasi-Isomorphic binary trees
- Mirror or symmetric binary tree
- Convert binary tree to mirror/symmetric tree
Binary Search Tree Interview Questions
- Minimum and maximum value in binary search tree
- Search node in a binary search tree
- Delete node from binary search tree
- Check given binary tree is a binary search tree
- Ceil value of input data in binary search tree
- Floor value of input data in Binary search tree
- Find lowest common ancestor (LCA) in binary search tree
- Find K smallest element in binary search tree
- Print binary search tree for given range K1 & K2
- InOrder predecessor of a node in BST
- InOrder successor of a node in BST