Goldman Sachs Interview Question

Compress a string; friend group