Airbnb interview question

Implement a simple encoding for a collection of strings