Biotonic subarray

code works when given custom inputs but not for test cases