Solution for problem [Wildcard Matching]