So I\'ve been trying to solve this assignment whole day, just can\'t get it.
The following function accepts 2 strings, the 2nd (not 1st) possibly containing *
Here's some Python "psudocode" that may help
def samePattern(s1,s2):
if s2 == "*" or s1 == s2: return True
if s1 == "": return False
if s1[0] == s2[0]: return samePattern(s1[1:], s2[1:])
if s2[0] == "*": return samePattern(s1, s2[1:]) or samePattern(s1[1:], s2)
return False
Here is a rough guide for converting the code
s[0] = the first character
s[1:] = the string minus the first character