DIY: Expressive words
Problem statement
Given a string, S
, and a list of words
, return the number of words that are stretchy.
A word in words
is stretchy with respect to S
if S
can be derived by extending the letters of the word. Here is the extend rule:
For any group of the same continuous characters in a word from
words
, you can keep ...
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy