Chapter 14 Flashcards

1
Q

What is worst case of quick sort

A

theta n square

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is average case of quick sort

A

Theta(n log n)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is induction hypothesis

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is monotonic

A

It means f(x) value either remain same or increases. It does not decrease.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What algorithm is for Selection sort, Insertion sort,

Bubble sort

A

theta n square

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are slow sorting algorithm

A

Selection sort
Insertion sort
Bubble sort

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What algorithm is for merge sort, heap sort and quick sort

A

n log n

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is algorithm animation

A

Animate an algorithm to see what it is doing

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How merge sort works

A

It divide the number set into parts and sort those parts individually. And then after that, sort all these parts together.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How heap sort works

A

It works with max and min keys

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which algorithm is fast.

n log n Or theta n square

A

n log n

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How selection sort works

A

We take value of algorithmic data from left and put them on right side iterative.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly