Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Let A a zero-based array with size n
- for i from 1 to n - 1 {
- x = A[i]
- j = i
- while j > 0 and A[j-1] > x {
- A[j] = A[j-1]
- j = j - 1
- }
- A[j] = x
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement