Wildcard matching dynamic programming approach and iterative approach.