anonymous
  • anonymous
algorithm to find smallest two numbers from list
Mathematics
  • Stacey Warren - Expert brainly.com
Hey! We 've verified this expert answer for you, click below to unlock the details :)
SOLVED
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
schrodinger
  • schrodinger
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
anonymous
  • anonymous
how many no.s are given??
anonymous
  • anonymous
its a sequence of numbers from 1 to n distinct
anonymous
  • anonymous
use an array to store this numbers. compare the first element of the array with the rest. if any no becomes smaller than the first no. while checking then replace the first no with the smaller one and continue the checking the the new no. at last you will get the smallest no. at the first position.

Looking for something else?

Not the answer you are looking for? Search for more explanations.

More answers

anonymous
  • anonymous
write algo that returns index of the first item that is less than its predecessor in sequence S1 ............. Sn, if s in nondecreasing order that algo returns the value 0
anonymous
  • anonymous
do u know C language?
anonymous
  • anonymous
ya i know
anonymous
  • anonymous
do u want the algo?
anonymous
  • anonymous
yes
anonymous
  • anonymous
take c as a array. c={1st , 2nd,........nth} for (i=0:1
anonymous
  • anonymous
i think it works
anonymous
  • anonymous
thanks i wll try ok

Looking for something else?

Not the answer you are looking for? Search for more explanations.