Algorithms Flashcards
Key techniques for Computational Thinking
Name the three techniques
1) Decomposition
2) Abstraction
3) Algorithmic thinking
Decomposition
Define this term
Breaking down a complex problem into smaller problems and solving each one individually.
Abstraction
Define this term
Picking out the important data from the problem, ignoring the data that doesn’t matter.
Algorithmic Thinking
Define this term
A logical way of getting from the problem to the solution.
EXTRA:
If the steps you take to solve a problem follow an algorithm then they can be reused and adapted to solve similar problems in the future
Algorithm
Define this term
A well-defined set of instructions for completing a specific task.
Psuedo-code
1) Not an actual programming language but follows a similar structure and should read like one (roughly).
2) The idea is that it should clearly show an algorithm’s steps without worriying about the finer details and syntax
3) It is quick to write and easy to convert to a programming language
4) There are different ways to write it but it is correct so long as the person reading it understands how it works
Flow Charts
Flow charts can represent algorithms and just like psuedo-code, there are different ways to write the same algorithm. They are represented using shapes.
Start / Stop
Name the shape and function of this block
Start / Stop is shown by boxes with rounded corners.
These represent the beggining and end of the algorithm.
Input / Output
Name the shape and function of this block
Inputs and Outputs are shown by parallelograms.
These represent anything that’s put into or taken out of the algorithm.
Processes
Name the shape and function of this block
Processes are shown by rectangles.
These represent general instructions, processes and calculations.
Decisions
Name the shape and function of this block
Decisions are shown by diamonds.
These represent decisions, often with a ‘yes’ or ‘no’ answer.
Subroutine
Name the shape and function of this block
Subroutines are shown by rectangles that look like briefcases.
These represent references to other flowcharts, the flowchart’s function().
Arrows
Name the function of this shape
**Arrows connect blocks and show the direction you should follow. **Some blocks might have multiple arrows coming in or going out of them.
Search Algorithms
Name the 2 main search algorithms
1) Binary Search
2) Linear Search
Binary search
Describe this search
A Binary Search looks for items in an Ordered List
Binary search works by looking for the middle of the list, checking if it is the item it is looking for, if not check if the item is in the side next to it and delete the group with no item in it.