Binary Search
Binary search (BS) is one of the most important concepts in CP algorithms in general. You will use binary search everywhere.
We will see what is BS, the different implementations of BS, what are the things to remember while implementing BS, what is s...
teckbakers.hashnode.dev11 min read
Robin Mason
To your attention writer, the line "This causes an overflow error. In C++ any value which is greater than 2147483647 (2^33 - 1) gets started back with (-2^33)" looks completely wrong and misleading. The idea you are trying to convey is appreciable but the information you have provided is not to the mark. It is -2^31 and not -2^33. This value is contradictory in itself as signed integer in C++ cannot hold values beyond -2^31. Overflow takes values from extreme positive to lowest possible value depending on whether the integer is signed or not. I request you to avoid such mistakes for yet-to-come corpus.