Sorting in linear time question

Question is given in the uploaded image


Link to my code is : https://ide.codingblocks.com/s/43178
While submitting only one test case gets passed .
Pls guide.

Hey Shubham, your code just needed a lil bit optimization, i have optimized your code you can refer this.

1 Like