Apexon interview question

code for Plaindrome check. code for Paranthesis check.