Chapter 14 Flashcards
What is worst case of quick sort
theta n square
What is average case of quick sort
Theta(n log n)
What is induction hypothesis
Induction: Prove that for any integer , if P(k) is true (called induction hypothesis), then P(k+1) is true. The first principle of mathematical induction states that if the basis step and the inductive step are proven, then P(n) is true for all natural number
What is monotonic
It means f(x) value either remain same or increases. It does not decrease.
What algorithm is for Selection sort, Insertion sort,
Bubble sort
theta n square
What are slow sorting algorithm
Selection sort
Insertion sort
Bubble sort
What algorithm is for merge sort, heap sort and quick sort
n log n
What is algorithm animation
Animate an algorithm to see what it is doing
How merge sort works
It divide the number set into parts and sort those parts individually. And then after that, sort all these parts together.
How heap sort works
It works with max and min keys
Which algorithm is fast.
n log n Or theta n square
n log n
How selection sort works
We take value of algorithmic data from left and put them on right side iterative.