You are on page 1of 1

for x <-1 to N-1 do

temp<- A[x]
y<-x-1
ketemu<-false
while(y>=0) and not ketemu do
if temp < A[y] then
A[y+1] <- A[y]
y<-y-1
else
ketemu<-true
endif
end while
A[y+1]<- temp
endfor

You might also like