Goldman Sachs interview question

string compression and a minimum path sum