3.1 Algorithms Flashcards
Abstraction
Selecting the important and relevant information in a problem
Algorithm
Step by step set of rules or instructions used to solve a problem or complete a task
Algorithmic thinking
Developing an algorithm to solve a problem
Computational thinking
The steps taken to find the best solution to a problem
Decomposition
Breaking down a complext problems into smaller sub-problems which can be solved individually
Pseudocode
A method of writing an algorithm shwoing the different steps. It must be readable and easy to interpret. IT IS NOT A PROGRAMMING LANGUAGE
Flowcharts
A method of writing an algorithm which uses different shapes to represent different commands. Flowcharts can show sequences, selection and iteration.
Search algorithm
Used to look for items. The two main types are binary and linear.
Binary search
Used to look for items in an ordered list. Sometimes called ‘divide and conquer’ as the list is halved each time.
Linear search
Used to look for items by checking each item in turn. The list does not need to be in order as every item is checked.
Sorting algorithm
Used to sort a list into order. The main types are bubble and merge sorts.
Bubble sort
Looks at the first two items in a list and puts them in the right order if necessary. It then works through the list comparing each of the numbers. When it gets to the end of the list it starts again. Each time it goes through the list this is called a pass.
Merge sort
Divide and conquer algorithm which splits the list in half into sub-lists and continues doing this until there is only one item in each sub-list. It then merges pairs of sub-lists putting the items in the right order until all the sub-lists are merged into one final ordered list.