Increasing Decreasing Sequence help

Its failing in test case number 4 and 9. Can you please guide me where I am going wrong?

Please specify the question number or share the question link so that I could check the test cases and share your code as well…

Hey Rohit,
As you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.

Please mark your doubts as resolved in your course’s “ Ask Doubt ” section, when your doubt is resolved.