Longest Increasing Subsequence

Please Help Me to Debug the code Two Test Cases Are failing