Join 36000+ teachers and students using TTIO.
Note: Coded tutorials for Binary and Linear Search provided in the next units.
An algorithm is a sequence of instructions or a set of rules to get something done.
You probably know the fastest route from school to home, for example, turn left, drive for five miles, turn right. You can think of this as an ‘algorithm’ – as a sequence of instructions to get you to your chosen destination. There are plenty of algorithms (i.e. routes) that will accomplish the same goal; in this case, there are even algorithms (such as in your satnav) for working out the shortest or fastest route.
Algorithms are written for a human, rather than for a computer to understand. In this way algorithms differ from programs.
We spend much of our life searching for stuff. Searching is important and we need to know how to get computers to do it efficiently. In this section we'll be looking at two different types of search.
Searching Algorithms :
Has anyone ever told you to "sort out your life"? No? Okay, well sorting is big business and it happens all around you, all the time. When you do your shopping and have change left over, you sort your money out in order to store it. You also sort cards - if you're the card playing sort - excuse the pun! Sorting, when it comes to computers, is hugely important, and people dedicate their whole lives to finding an efficient sorting algorithm. Why? Because it's all down to efficiency. The faster you can sort stuff, the better. Imagine if you had a million records, you would want to be able to sort through them as fast as possible right?
The three sorting algorithms you will be looking at are:
Bubble Sort, Merge Sort, Insertion Sort
This series will primarily look at python code for the various sorting algorithms, along with an explanation (video or presentation) for each. If you're really interested however, there is plenty of additional information on this topic below: