Implemented palindrome test cases for Stack