AS Decision - 1: Algorithms Flashcards
Algorithm Definition
An algorithm is a finite sequence of step-by-step instructions carried out to solve a problem
Flow Chart Symbols
- Start/Stop
- Instruction
- Decision
Start/Stop = oval
Instruction = rectangle
Decision = diamond
Bubble Sort Advantages (3)
- simple to implement
- efficient way to check if list is in order
- (left to right or right to left)
Bubble Sort Disadvantages (1)
- extremely inefficient to write
Bin Packing: First-First
- advantages (1)
- disadvantages (1)
Adv: quick to do
Dis: not likely to lead to a good solution
Bin Packing: First-Fit Decreasing
- advantages (2)
- disadvantages (1)
Adv: usually get fairly good solution
easy to do
Dis: might not get an optimal solution
Bin Packing: Full Bin Packing
- advantages (1)
- disadvantages (1)
Adv: usually get fairly good solution
Dis: difficult to do