Help me in solving SESO23 problem

My issue

can anyone arrange this code,
please

Rearrange the following code

  • key = A[i]

  • while j >= 0 and A[j] > key

  • j = j - 1

  • end while

  • for i = 1 to length(A) - 1

  • A[j + 1] = A[j]

  • end for

  • j = i - 1

  • A[j + 1] = key

Learning course: BCS301: Data structures
Problem Link: https://www.codechef.com/learn/course/abesit-dsa/ABESITDS24/problems/SESO23