Programming Question

Question: You are given two strings, pattern and value. The pattern string consists of just the letters a and b, describing a pattern within a string. For example, the string catcatgocatgo matches the pattern aabab (where cat is a and go is b). It also matches patterns like a, ab, and b. Write a method to determin if value matches pattern.

From: Cracking the Coding Interview [McDowell]

Subject: Moderate

Load Another Question


Select a Subject