procedure last smallest61 a2 an integers min 81 location 1 r

procedure last smallest(61, a2,..., an integers) min 81 location 1 return location for i 2 to n min Gi location a if min 2 ai then

Solution

Hi, I have arranged all steps in correct way.


procedure last smallest(a1, a2, a3,...,an : integers)
   min := a1
   location := 1

   for i := 2 to n
       if min ai then
           min := ai
           location := i
          
   return location

 procedure last smallest(61, a2,..., an integers) min 81 location 1 return location for i 2 to n min Gi location a if min 2 ai then SolutionHi, I have arranged

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site