Please enable JavaScript.
Coggle requires JavaScript to display documents.
PAPER 1 EDUCAKE DIRT - Coggle Diagram
PAPER 1 EDUCAKE DIRT
Sorts
Binary v.s Linear
Binary requires the list to be ordered, Linear does not
-
Linear search algorithms search each item of data and compares it to the desired result until a match is made. Once the item is found the linear search ends
Binary searches find a midpoint in the list and compare it with the desired result; if the midpoint is lower than the search value the list is halved and the bottom half of the list is ignored. If the midpoint is greater than the search value then the list is halved and the top half is ignored. This is repeated until the value is found at the midpoint.
-
Bubble sort
Bubble sorts compare neighbouring pairs of items and swap their positions if they aren't in the correct order. It repeats this until the list is completely sorted
Merge sort
Merge sorts split the list up and put it back together by combining smaller, sorted lists of data
-
-
Variable v.s constant
Variables are named locations in a computer's storage where a single item of data is stored that can be changed freely as a program is running
Constants are named locations in a computer's storage where a single item of data is stored that cannot be changed whilst a program is running
The main difference is that constants cannot be changed whilst a program is running whereas variables can be changed
-
-