Didn't understand the question

in the question statement, it’s saying to divide the numbers into two sequences such that the first sequence strictly decreases and the second one strictly increases

but in the output format, it require either increasing or decreasing

Hi @samikshagarg321_02590e2e7c8a8e95 the question says that you need to check if the the whole array can be partitioned somewhere such that initial numbers are increasing and remaining are decreasing

eg 1 2 3 4 9 8 7 6 can be divided into 1 2 3 4 5 9 (increasing) and 8 7 6 (decreasing)

for implementation difficulties check this I’ve commented properly https://ide.codingblocks.com/s/656052