Help me in solving CPDSAPY70 problem

My issue

Give me the answer for this question

Learning course: 214CSE2302: Getting started with Data structures
Problem Link: Rearrange code Practice Problem in 214CSE2302: Getting started with Data structures - CodeChef