AS Decision - 1: Algorithms Flashcards

1
Q

Algorithm Definition

A

An algorithm is a finite sequence of step-by-step instructions carried out to solve a problem

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

Flow Chart Symbols
- Start/Stop
- Instruction
- Decision

A

Start/Stop = oval
Instruction = rectangle
Decision = diamond

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

Bubble Sort Advantages (3)

A
  • simple to implement
  • efficient way to check if list is in order
  • (left to right or right to left)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Bubble Sort Disadvantages (1)

A
  • extremely inefficient to write
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Bin Packing: First-First
- advantages (1)
- disadvantages (1)

A

Adv: quick to do

Dis: not likely to lead to a good solution

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

Bin Packing: First-Fit Decreasing
- advantages (2)
- disadvantages (1)

A

Adv: usually get fairly good solution
easy to do

Dis: might not get an optimal solution

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

Bin Packing: Full Bin Packing
- advantages (1)
- disadvantages (1)

A

Adv: usually get fairly good solution

Dis: difficult to do

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