In an array with a low and a high index of the left and right borders, respectively, there are two ways to find the middle element:
1. int mid = (low+high)/2; 2. int mid = low + ((high - low) / 2);
The first implementation will simply cause the variable to overflow. The second will take care of this.