# Sample Questions

## Sample Questions

* Draw a relationship diagram for P, NP, NP-hard, and Np complete.
* Calculate the time complexity of binary search and linear search.
* Calculate the time complexity of following Sorting Algorithms.
  * Selection Sort, Insertion Sort, Bubble Sort
  * Merge Sort, Quick Sort, Heap Sort, Shell Sort
  * Counting Sort, Radix Sort, Bucket Sort
* Write a pseudo code for a heapsort algorithm using stack. You do not need to implement the stack.
* Implement max heap sort for the following numbers. 4, 3, 7, 1, 8, 5
* What are the bottlenecks of the greedy algorithm?
* How can you search a number in O(1) average complexity?
