Help me in solving DSAC59 problem

My issue

explain this problem

Learning course: BCS304: Data structures and Applications
Problem Link: Practice - Rearrange Code Practice Problem in BCS304: Data structures and Applications - CodeChef