The Data Mining Blog : Data Mining : Business Intelligence : Analytics : Marketing : Finance:

Algorithm

Posted in Analytics, Business Intelligence, Data Mining by Pankaj Gudimella on February 12, 2009

An algorithm is a set of instructions that allows you to solve a problem.

Each instruction is simple and repeatable. It’s important to understand that the instructions work on all similar problems, not just one.

Here’s an algorithm for sorting any set of numbers, to get them into order. Start with 4,3,5,6,2 for example.

The bubble sort algorithm is simple. Compare two numbers. If the first number is higher than the second, switch them. So now it’s 3,4,5,6,2. Next step is to compare positions two and three. If the second is higher than the third (it’s not) switch them. Repeat for the whole string. Then start over. Do it over and over again until you can go the whole way with no switching. Done.

More here from Seth.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: