Pergunta de entrevista da empresa speedbox

Q: Find the first repeating character in a string.

Resposta da entrevista

Sigiloso

31 de dez. de 2021

I first told the brute force approach where I am comparing every element with another element. So he asked me what is the time complexity so I told O(n^2). So he told me to optimize. I came up with the hashing technique and told him the approach. It was taking the O(2N) time so he told me to further optimize but I could not. That it