Amazon interview question

run length encoding + decoding