MathWorks Interview Question

Greedy algorithm problems, string manipulation