Section 1 - Fundamentals Of Algorithms Flashcards
What is an algorithm?
An algorithm is a series of steps that can be followed to complete a task.
What is decomposition?
Decomposition involved breaking down a problem into smaller, simpler steps.
What is abstraction?
Abstraction involves removing unnecessary details from a problem in order to solve it.
What are flowcharts?
Flowcharts are diagrams which use certain symbols to show the flow of data
What does the oval represent in a flowchart?
The START and END
What does the quadrilateral represent in a flowchart?
It is a process box. (E.g 1 + 1)
What does the parallelogram represent in a flowchart?
This is an input and output box
What does the diamond represent in a flowchart?
This is a decision box that can only accept yes or no answers
What is pseudocode?
Pseudocode is used to write an algorithm in programming-style constructs but it is not in an actual programming language
What are the 3 constructs used to write algorithms?
Sequence, selection and iteration
What is selection?
If, elif and else
What is sequence?
Sequence is just the order code goes in.
What is iteration?
For, while and repeat
What are the 2 common search routines?
Linear and binary searches
What is a linear search?
When data is unsorted, the only sensible option when searching for a particular item is to start at the beginning and look at every item until you find the one you want