I don't think this is quite accurate. What if the array is all ones?