LTS

Convert C++ code to MIPS Assembly Language

for i = 1 to length(A)
    j = i
    while j > 0 and A[j-1] > A[j]
        swap A[j] and A[j-1]
        j = j - 1