mam, it's not like that, it is like
<3,2,1> is input !
min = infinity ( as per question ), Now updated_count=0, this variable indicates how many times we updated it !
Now starts our algorithm, input length is n ==> i =0 to n-1
at i=0, i am read a[0]=3, now i compare a[i] < min , yes it is satisfied then min = 3, updated_count++
at i=1, i am read a[1]=2, now i compare a[i] < min , yes it is satisfied then min = 2, updated_count++
at i=2, i am read a[2]=1, now i compare a[i] < min , yes it is satisfied then min = 1, updated_count++
at i=3, out of loop.
What is the updated_count value ? it should be 3, right ?