Introduction to Algorithms (OCR A-Level Computer Science): Flashcards
📚Flashcards
Practise the cards
15 cards from this deck
ShowHide
Practise the cards
15 cards from this deck
Algorithm definition
Algorithm definition
Step-by-step instructions to perform a task/solve a problem
Purpose of algorithm design
Purpose of algorithm design
To solve a specific problem efficiently and logically
Flowchart oval symbol meaning
Flowchart oval symbol meaning
Start/End
Flowchart rectangle symbol meaning
Flowchart rectangle symbol meaning
Process (e.g., calculations)
Flowchart diamond symbol meaning
Flowchart diamond symbol meaning
Decision (e.g., IF statements)
Flowchart arrow symbol meaning
Flowchart arrow symbol meaning
Flow of control
Pseudocode definition
Pseudocode definition
High-level, structured, human-readable algorithm description
Two aspects of algorithm efficiency
Two aspects of algorithm efficiency
Time (speed) and space (memory)
Algorithm correctness meaning
Algorithm correctness meaning
Provides expected result for all valid inputs
Iteration in algorithms
Iteration in algorithms
Repeating steps using FOR, WHILE loops
Selection in algorithms
Selection in algorithms
Decision-making using IF, ELSE statements
Three algorithm representations
Three algorithm representations
Flowcharts, pseudocode, and program code
Common comparison operator mistake
Common comparison operator mistake
Using = instead of == in comparisons
Cause of infinite loops
Cause of infinite loops
Forgetting to update loop variables
Off-by-one error definition
Off-by-one error definition
Iterating one too many or too few times
