String Compression III at Qualcomm

Medium67.0% acceptance

This problem has 100.0% frequency at Qualcomm.

Problem Description

Given a string `word`, compress it using the following algorithm: * Begin with an empty string `comp`. While `word` is **not** empty, use the following operation: * Remove a maximum length prefix of `word` made of a _single character_ `c` repeating **at most** 9 times. * Append the lengt...

Read full problem and hints

Topics

Also asked at 7 companies


More Qualcomm Questions

View all Qualcomm questions