Linear & Binary Searches
Sorting 1 - Bubble sort
Sorting 2 - Merge sort
An algorithm is simply a sequence of steps used to solve a problem, like a recipe. See right. Our recipe might tell us how to create an apple pie or lemon cake.
An algorithm has a defined outcome – a defined end.
Algorithms can be written in many different ways.
Each way has a different cost, different speed and requires different external hardware.
You are creating an algorithm every time you write a program. You are creating a set of steps to perform a task. Before we create a computer program we write it out in one of two ways.
1. As a set of intructions like a recipe.
2. As a flowchart.
area= width x length.
display "what is the room's width?".
display "what is the room's length?".
A systematic approach