DIY: Expressive words
Explore how to determine the number of stretchy words that can be formed from a given string by extending groups of characters. This lesson teaches you to implement the expressiveWords function in Scala, helping you understand character group manipulation and solve similar interview problems with confidence.
We'll cover the following...
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:
...