pass low and high to find the beginning and end of the result array