how can i convert this bubble up algorithm into code? help guys!
index <-0
last_compare_at <-n-1
temp <-0
loop
exitif (index>last_compare_at)
if (A[index]>A[index + 1])then
temp <-A[index]
A[index] <-A[index +1]
A[index + 1]=temp
end if
index <-index+1
endloop
First step is to understand the algorithm. Do you?