Unit 7 - Algorithms and algorithmic Thinking Flashcards
What is Abstraction?
Removing unimportant parts of a problem in order to concentrate on those that are important
What is Decomposition?
Breaking down a problem into smaller more manageable ones
What is Algorithmic thinking?
An approach to solving problems by the use of algorithms (sequences of steps that lead to a solution)
What is a Structure diagram?
A hierarchical diagram that shows how a problem is broken down into sub-sections/sub-tasks.
What is Binary Search and how does it work?
This only works on a sorted list.
The middle item of the list is first checked.
If the item searched for is less than this item the right of the list is discarded, and a binary search is carried out on the left of the list.
What is Linear Search and how does it work?
Each item in the list is checked against the search item in order.
What is Bubble sort and how does it work?
Start with the leftmost item.
Compare this item with the one next to it.
If the one next to it is less, swap the items.
Repeat for all the other items.
At the end of one pass through the list, the largest item is at the end of the list.
Repeat the process until the items are sorted.
What is Insertion sort and how does it work?
This algorithm sorts one data item at a time
One item is taken from the list, and placed in the correct position.
This is repeated until there are no more unsorted items in the list,
What is Merge sort and how does it worK?
Divide the unsorted list in two.
Continue to divide these lists into two until there is just one item in each list.
Now merge each list back until there is only one
list remaining – which will be the fully sorted list.
Order 3 sort methods from least to highest efficiency.
Bubble sort, Insertion sort, Merge sort.
What does a Rhombus signify in a flowchart?
Decision
What does a Rectangle signify in a flowchart?
Process - Maths operations and assignment of variables
What does a Diamond signify in a flowchart?
Decision - Change flow based on a decision
What does a Rounded Rectangle signify in a flowchart?
Terminal - Start and Stop
What does a Rectangle with embedded lines signify in a flowchart?
Sub program - Similar to a function