Run-Length Encoding and Decoding
Implement a run-length encoder that compresses a string of ASCII characters, then implement a decoder that decompresses the encoded string in sub-linear time using binary search.
Asked at:
Google
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Early August, 2026
Mid-level
First question was to implement a basic RLE function to encode a string (could contain any ASCII characters). Second question was to implement a function to decode an RLE compression. Importantly, this had to be done in better than linear time (use binary search)
Hello Interview Premium
Your account is free and you can post anonymously if you choose.