Entry
what is the best algorithm for searching the minimum in a large range of numbers?
Apr 23rd, 2005 03:10
Keyar Srinivasan, Ankit Sharma, chintan j,
To find minimum in a range of numbers you have to look at every number.
So best way would be take a variable, say temp, initialized to first
number of pool. Now traverse the number pool and if any number is less
then temp then copy that to temp. So in the end you have the minimum
number.
-----------------------------------------------------------------
One common algorithm, Prim's algorithm, is, in fact, very similar to
Dijkstra's algorithm for finding shortest paths
http://www.cprogramming.com/tutorial/computersciencetheory/dijkstra.html
---- By Keyar Srinivasan-----