Transforming Lives. Inventing the Future.

 

Algorithms

An algorithm, in general term, is a procedure that one follows in order to accomplish a specific task. Just as there are many ways a task can be accomplished in real life, there are also many ways one can go about solving a problem in computer science. Let's take searching for the word 'computer' in a dictionary as an example. You can start from the beginning of the dictionary with the letter 'a'. You would compare each entry you encounter to see if that matches the word 'computer'. Do this after a while and you will end up finding the definition for 'computer'. There is nothing wrong with searching dictionary using that method (algorithm). However, we all know it is a very ineffecient way to do. Most will just go to a specific aphabetical marker first and start from there. This way, the search time is much less than using the first method.

We use and sometimes create our own algorithms to help us accomplish things faster and more efficient. That is also the case in computer science. There are slow and fast ways to code things. As the case for searching, you can choose a linear search, or if the data is sorted, a binary search. A good understanding of problem solving and algorithmic approaches will help you become a better programmer.

Problem Solving Basics and Computer Programming - A programming language independent, problem-solving overview.

Algorithms Guide - The slides teach the students about the basics of algorithms, including sorting and analysis.

Demonstration - This site has demos for the sorting algorithms. It goes thru the code line by line as it presents the sorting animation.

© 2005 Illinois Institute of Technology