Implement encode/decode for list of strings | NVIDIA Interview Question