DIY: Expressive words
Solve the interview question "Expressive words" yourself in this lesson.
We'll cover the following...
Problem statement
Given a string, S
, and an array 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 ...