Meta Interview Question

Run-length encoding problem