Tech Mahindra interview question

Write a pseudo code for arranging elements of a list