Difference between my solution and editorial

My Solution: CodeChef: Practical coding for everyone (WA)
Editorial: FORESTGA - Editorial

I see the only difference is the initialization of left to -1 and the binary search condition. I do not understand what difference it makes. Can someone help me with that?

Thanks