Pergunta de entrevista da empresa Amplitude

Encoding and decoding a string for purposes of compression.

Resposta da entrevista

Sigiloso

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