Domanda di colloquio di speedbox

Q: Find the first repeating character in a string.

Risposta di colloquio

Anonimo

31 dic 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