Non-motoring > Algorithms. Miscellaneous
Thread Author: Old Navy Replies: 4

 Algorithms. - Old Navy
Anyone watching BBC 4 ?
 Algorithms. - Ted

I never understood them in maths class at skool !
 Algorithms. - Ambo
Basically, just choose an alternative and see where is takes you. Hamlet showed as the way: to be/not to be; take arms against a sea of troubles/by opposing end them; bare bodkin etc.
 Algorithms. - Slidingpillar
A process or set of rules to be followed in calculations or other problem-solving operations.

Or in other words, a method for doing something, not an equation.

Simple example

find_max().

Problem: Given a list of positive numbers, return the largest number on the list.

Inputs: A list L of positive numbers. This list must contain at least one number. (Asking for the largest number in a list of no numbers is not a meaningful question.)

Outputs: A number n, which will be the largest number of the list.

Algorithm:

Set max to 0.
For each number x in the list L, compare it to max. If x is larger, set max to x.
max is now set to the largest number in the list.
 Algorithms. - Cliff Pope

>>
>> Simple example
>>
>> find_max().
>>


You are Number Cruncher, and I claim my £5 :)
Latest Forum Posts