racing horses easy

Dont know whats wrong with my solution

pls help http://www.codechef.com/viewsolution/3500187

algo i used is

1>sorted the array

2>found the minval from the sorted set by taking difference of each pair…

got ac

i was sending the wrong limit to the qucick function it should be till n-1

sorry my bad…

//