Index out of bound exception.plz do correct the code

Ok I’ll help only to remove the index out of bound exception. Check the values of low and high.
Should be 0 and arr.length-1