I could sort an array with respect to another if there is unique value. But since i am trying sort the below given array:- initial fuel[]={1,9,9,2,9,9}; initial cos