Amplitude interview question

Encoding and decoding a string for purposes of compression.

Interview Answer

Anonymous

Jul 7, 2021

One can use a hasmap to keep track of repeated phrases and their location, then only the unique items and their location in the string is what we need to get the original string.