Unit 6: Algorithms Flashcards
What is an Algorithm?
Set of instructions for how to solve a problem/perform a task.
What are the key techniques of Computational Thinking?
Abstraction
Decomposition
Algorithmic Thinking
What is Abstraction?
Picking out the important parts of information and ignoring the specific details that aren’t relevant.
What is Decomposition?
Breaking a complex problem into smaller problems and solving each one individually.
What is Algorithmic Thinking?
A logical way of getting from the problem to the solution. If the steps you take to solve a problem follow an algorithm, they can be reused and adapted to solve similiar problems in the future.
What is Pseudocode?
Not an actual programming language but shows a similiar structure and reads like one.
It is used to show an algorithm’s steps clearly without worrying about finer details (syntax) of any particular programming language.
What does the rectangle with rounded corners represent?
Flowcharts
The beginning and end of the algorithm (Sometimes called terminals)
What does the parallelogram represent?
Flowcharts
Inputs/Outputs of an algorithm
What does the rectangle represent?
Flowcharts
General instructions, processes and calculations
What does the diamond represent?
Flowcharts
Decisions - Often ‘Yes’ or ‘No’
What does the rectangle with two lines represent?
Flowcharts
Sub programs
Why are Flowcharts Used?
- It can show sequences, selections and iterations.
- Like pseudocode they break algorithms down into stages which can then be used by a programmer to quickly turn an algorithm into code.
What are the two types of Searches?
Searching Algorithms is on GoodNotes
Linear Search
Binary Search
Searching Algorithms is on GoodNotes
What are the Advantages and Disadvantages of Linear Searches?
**Advantages: **
You don’t gave to sort a list in order
**Disadvantages: **
It is the least efficient search
What are the Advantages and Disadvantages of Binary Searches?
**Advantages: **
It is the quickest and most efficient search.
**Disadvantages: **
You have to sort the list before you find the item.