Decomposition
Breaking a complex problem down into smaller problems and solving each one individually
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 then they can be reused and adapted to solve similar problems in the future.
Abstraction
Picking the important bits of information from the problem, ignoring the specific details that don’t matter
Binary search
Keep comparing with the middle item in an ordered list
Linear search
Check each item of a list in turn to see if it’s the correct one
Linear vs binary search
Linear search is much simpler, but not as efficient. Linear can be used on any type of list, doesn’t have to be ordered. Binary is more suitable for a large list.
Bubble sort
Bubble sort pros
Bubble sort cons
Merge sort pros
Merge sort cons
Incersion sort (orders the items as it goes)