Confused with search conditions for 2 pointers/binarysearch

Was working on the EPI chapter of "Searching". I was working through some problems and I was wondering what the different types of scenarios were for using
while left <= right vs while left < right.
specifically I was looking at https://leetcode.com/problems/sqrtx/
and I couldn't figure out as to why left <= right is preferable here. In fact most of the solutions for the problems in this chapter are left <= right so when is left < right ever viable? Can I go the rest of my leetcode career using just left <= right?

Comments (1)