Three test case giving wrong answer in wildcard pattern matching

Here is my code
https://ide.codingblocks.com/s/117007