Sorting in linear time

my code is correct but my array is not getting sorted
here is my code https://ide.codingblocks.com/s/268445