Pregunta de entrevista de Amplitude

Encoding and decoding a string for purposes of compression.

Respuesta de la entrevista

Anónimo

7 jul 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.