Amazon SDE1 phone screen - Run-length encoding

1 Hour Total

30 minutes behavioral ( tell me about one project you are proud of )

30 minutes encode/decode

Encode:
Input: “WWWWWWWWWBBBBBBB”
Output: “9W7B”

Decode:
Input “9W7B”
Output: “WWWWWWWWWBBBBBBB”

1 Like