This is a question in my paper test today, the function signature is
int is_match(char* pattern,char* string)
The pattern is limited to only A
See This Question for a solution you can not submit. See this paper for a description of how to implement a more readable one.