Increasing decreasing sequences Question


Getting wrong Output for TEST CASE 2 It is passing other test cases