Practice ยท 1 of 1
Property: Round-Trip Codec
Implement both halves of a tiny codec and prove the round-trip property: decode(encode(v)) == v for every vector. Encoding: run-length, e.g. {3,3,3,5} -> "3x3,1x5". Decode parses that exact format back. Empty vector encodes to the empty string and decodes back to empty.
Difficulty: advanced
Press Submit to check your solution.
Back to lesson: Practice: Practice: Round-Trip Codecs