(3) Fundamentals of Algorithms Flashcards

1
Q

What is meant by recursively-defined?

A

A procedure/ subroutine that can call itself

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

What must each node contain in a binary tree?

A

Data

Left abs right pointers

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

What is the big O notation for Bubble Sort, Merge Sort, Binary Search and Linear Search?

A

O(log n): Binary Search - GOOD
O(n): Linear - DECENT
O(n^2) : Bubble Sort - POOR
O(nlog n): Merge Sort

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

Which search algorithm is this?

A

Linear Search

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

Which search algorithm is this?

A

Binary Search

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

Which sorting algorithm is this?

A

Bubble Sort

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

Which sorting algorithm is this?

A

Merge Sort

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

What is the big O notation for bubble sort?

A

O(n^2) : Bubble Sort - POOR

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

What is the big O notation for merge sort?

A

O(nlog n): Merge Sort

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

What is the big O notation for Binary Search?

A

O(log n): Binary Search - GOOD

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

What is the big O notation for Linear Search?

A

O(n): Linear - DECENT

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