In this blog post the author has suggested the following as the bug fix:
int mid = (low + high) >>> 1;
Does anyone know what is this >>> operator? Certainly its not there on the following operator reference list:
- http://msdn.microsoft.com/en-us/library/x04xhy0h%28v=vs.71%29.aspx
- http://www.cplusplus.com/doc/tutorial/operators/
What is it and how does that solve the overflow problem?
>>>is not a part of C++. The blog contains code in Java.Check out Java online tutorial here on Bitwise shift operators. It says