You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given a string sentence, return a compressed version of the sentence where consecutive duplicate words are replaced by the word followed with the number of times it repeats in parentheses.
5
+
6
+
Only consecutive duplicates are compressed.
7
+
Words are separated by single spaces.
8
+
For example, given "yes yes yes please", return "yes(3) please".
0 commit comments