That is a bit of a surprise, you got three answers and all three are wrong. They have written code, not algorithms.
An algorithm is a codeless description of the problem you are solving in a programming project. So as an example lets say we have a project to collect particular values from a database that already exists, the values are related to an input value given by a user.
The way we do it is start with the whole project as a single object. So our first stage algorithm is our project itself.
Algorithm 1 - collect particular values from a database that already exists, the values are related to an input value given by a user..
Now we start to break that down into steps, starting with large steps.
Algorithm 2 -
a) Collect input from user.
b) Collect related items from database.
c) Show result.
Now each of these are broken down further into smaller parts. We have to side step for a moment here. There are programmers who love graphical algorithms, starting at the top of a piece of paper, in pencil because you will change it a lot, you go from a box called 'Start', then go through each step (still large steps at this stage). Then each large step broken to smaller steps until you have programmable steps.
Personally I never use the graphical respresentation, it doesn't get my mind into the right zone for programming. Instead I write algorithms in list form. You can choose which ever works for you, you might even find that a mixture of the two works best. Also, all of my programming languages have a C-like syntax, so over the years I have made my algorithms more C-like. For me it means that when I come to the coding stage the code basically writes itself directly from the algorithm.
So back to our project.
Algorithm 2a - Get input from user.
1) Present the user with a means to input one or more values.
2) Check the input for validity, make sure it falls within the limits of our project and is of the right type.
Alforithm 2a1 - Present user with input form.
Form - UserInput -
----------txtInput - textbox to receive input.
---------btnOK - button to confirm input
--------btnCancel - button to cancel input
Algorithm 2a2
Back code - Validate user input.
Functions
-------TestUserInput(txtInput.text);
-------ReportBackIfUserInputInvalid();
And so it goes on through your project. This system can be used for projects from the huge to the very small. You would often find yourself changing or updating a small piece of code, possibly written by another programmer. Using the algorithm you can be more sure of getting the gist of what the orriginal programmer was doing, what values are available to your code in the part of his project that you are working in.
Do one now, Write an algorithm for tic tac toe, everyone knows that game so you can concentrate on the writing of the algorithm rather than the problem you are solving. Start with the big picture, then brak it down until you have function sized pieces.