Given a string, count the number of words ending in 'y' or 'z' so the y in "heavy" and z in "fez" count but not y in "yellow".
Sample test cases:
count("fez day")=2
count("day fez")=2
count("day fyyz")=2
count("yellow zod")=0
Sample test cases:
count("fez day")=2
count("day fez")=2
count("day fyyz")=2
count("yellow zod")=0

No comments:
Post a Comment