Presentation is loading. Please wait.

Presentation is loading. Please wait.

A PowerPoint about Algorithm’s. What is an algorithm? A step by step process of instruction.

Similar presentations


Presentation on theme: "A PowerPoint about Algorithm’s. What is an algorithm? A step by step process of instruction."— Presentation transcript:

1 A PowerPoint about Algorithm’s

2 What is an algorithm? A step by step process of instruction

3 What are the problems with the following algorithms ? Using the next slide add notes using text boxes and arrows to show what problems are and where.

4 START GET CUP PUT TEA BAG IN PUT MILK IN PUT SUGAR IN? STIR IT END NO YES START Put water in kettle Boil kettle Get a cup and put a tea bag in Pour water in kettle Remove tea bag Put milk in? Put sugar in? END NO YES NO No hot water? Take out teabag? Pour water in mug and stir

5 Searching for data…. Using Algorithms. What is a linear search algorithm? A linear search is when you one by one check through each answer to check if it is right. What is a binary search algorithm? A binary search is when you start in the middle then cut in half after each question until the answer is found.

6 Which is best when searching for data? Why? Use an example and give the good and bad points of each search method Binary search is good as it is efficient and fast. For example playing guess who it is much more efficient to use binary as it takes about 5 guesses where as linear it could take up to 24 guesses Linear search is bad as it is slow and inefficient. Linear is good as you may get lucky and get it within the first few guesses. Binary is bad as it may not get it within the first couple of guesses. For example Linear could get it within the first go or two where as binary has to narrow it down much more before answering.

7 Sorting data Selection sort took me 1:44 minutes to sort 15 slips into number order Selection is looking through each slip 1 by 1 Bubble sort took me 51 seconds to sort all the slips Bubble is comparing each slip whether is before or after Merge sort took me 1:22 to sort the slips Merge is sectioning each slips into groups of a smaller number then ordering them in numerical or alphabetical order Overall the best form of sorting was bubble sorting


Download ppt "A PowerPoint about Algorithm’s. What is an algorithm? A step by step process of instruction."

Similar presentations


Ads by Google