I was trying a question on searching/sorting (Problem link) and i defined my own comparator for in-built sort(). It produced ambiguous output for the input (Error Code Link). However, when i changed the "<=" to "<" in my comparator, the code (Accepted Code Link) worked properly and was accepted. I dont know how this happened and what was the significance of changing the comparison condition.
Maybe this will help
ninjaed
to you, I am Mr. Ninja
Here, here, here, and many more.