Tech Mahindra Interview Question

Write a pseudo code for arranging elements of a list