Goldman Sachs Interview Question

string compression and a minimum path sum