2.1 Algorithms - CT, Searching + Sorting Algorithms Flashcards

1
Q

What is computational thinking?

A

Solving problems that can be implemented by a computer system

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

What type of list does a bubble sort sort?

A

An unordered list of items.

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

How does a bubble sort work? (2 marks)

A

Largest item “bubbles” up to the end of the list in successive passes (one-by-one).

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

When does a bubble sort finish?

A

When there are no more swaps that need to be made.

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

How does a bubble sort work in simple terms?

A

Bubble sort = items move right

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

What is a disadvantage of bubble sort?

A

Most inefficient sorting algorithm.

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

What is an advantage of bubble sort?

A

Very easy to implement.

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

Is bubble sort good for small or large data sets?

A

Small data sets

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

Is insertion sort good for small or large data sets?

A

Small data sets

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

Is a bubble sort or insertion sort more efficient and why?

A

Insertion sort because it has less swaps.

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

How does an insertion sort work?

A

Compare each item to value on the left.

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

How does an insertion sort work in simple terms?

A

Insertion sort = items move left

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