all tests passed for array of 1 to 10