Getting only 3 test cases right in increasing decreasing sequences in fundamental problems

Please tell me what is wrong with the code