Need Help in - HORSES Question

Question: HORSES Problem - CodeChef
Solution: CodeChef: Practical coding for everyone
O/P: WA

Can’t pass cases. Needed advise what went wrong.

Hi @achi,

You don’t need to check for all possible combinations of differences in the array. You just need to sort the array and find the minimum difference between two adjacent elements.

This is my Python implementation: CodeChef: Practical coding for everyone

Please let me know if you got AC. Feel free to ask any other doubts.

Cheers
Aadarsh…