Jane Street Interview Question

Code 3 functions on Run Length Encoding