Amplitude·Software Engineer·Technical Phone Screen
Jun 2026
Got a coding question from Amplitude for a software engineer role, dictionary encoding compression. Pretty self-contained problem but there are a few edge cases that'll trip you up if you're not careful.
- Implement an encode function and a decode function for dictionary encoding compression. The encoder takes a comma-separated string of words and outputs a compressed string where unique words form a dictionary and each original word is replaced by its index. The decoder reconstructs the original string from that compressed format alone, with no extra data passed along.
“The problem looks clean on the surface until you realize the decoder has to figure out where the dictionary ends and the index list begins just from the compressed string.”