Pergunta de entrevista da empresa Epic

The first programming problem is the Text Message Input problem(A:2,B:22,C:222,2:2222,D:3 ...), given a alpha-numeric string, print the corresponding key stroke series.

Resposta da entrevista

Sigiloso

27 de set. de 2014

First build a hash table for all possible "key, value" pairs in the alphabet. Then for each char in the string do a look up in the hash table and add the result to the output. Time Complexity of O(1)