As we know there are various ways to get the middle element/index for a given sub-array(during recursive calls). Also we have to take care of overflow, large value of low/high condition as well, so which one should we prefer?
Method 1
mid = (low + high) / 2
Method 2
mid = low + (high - low) / 2