Trace Tables involve examining a printed extract of program code, taking each line at a time, writing out the current state of each variable, and noting any output produced
Breaking a complex problem into smaller manageable parts
Advantages include making problems easier to solve and reducing development time by allowing different people to work on different parts simultaneously
the ram (random access memory) stores data temporarily while it's being used by the cpu
linear search - starting from the beginning of a data set and checking each item in turn until the item is found
binary search - calculated midpoint of data set and checks for item to be found. If item is lower than midpoint it repeats on left, vice versa. It repeats until item is found or there there are no remaining items left to check.
Binary search is quicker than linear search
but if item is first in the list, linear search would be far quicker
Fractions cannot be used for binary search, only integers
bubble sort compares each item with the next one in the list and swaps them if they are out of order
bubble sort is the most inefficient but it is very easy to implement and a popular choice for smaller data sets
merge sort uses divide and conquer method, creating 2 or more sub problems
merge sort is very effiebt
insertion sort - inserts each item into its correct position one at a time
insertion sort is useful for smaller data sets
syntax errors - break the grammatical rule of the programming language and stop it from running
logic errors - produce an unexpected output and on their own they are not enough to stop the program from running