With a partner play the Higher or lower game? start from 0 to 10, then 0 to 50 and then 0 to 100 and finally 0 to 500
What are search algorithms and why do we need them?
Often on your smart phone you might search for:
a contact in order to call me
a business or group on social media
a location on a map
Computers store a massive amount of information, and it would be impractical (if not impossible) to look for all the data we need manually. This means that computers need to be able to search through information to find it. What method the computer uses is known as the search algorithm.
A linear search algorithm is an algorithm that starts at the beginning of a list and goes through each item in the list, looking for a match.
Advantages
Very simple
Can be using on sorted or unsorted lists
Disadvantages
Very slow
A binary search algorithm is an algorithm that starts in the centre of a list and finds out of the value is greater or less than the value at the mid point (or if it is the value!)
The unused part of the list it then discarded and the process begins all over again.
Advantages
Very Fast, even with massive data sets
Disadvantages
Can only be used with sorted lists
Using Google Draw create a poster that clearly explain why we need to search data? what is the difference between binary and linear searches and also the advantages and the disadvantages of each type of search method.