UST interview question

Write a program for sorted number