Pergunta da entrevista

Entrevista para Software Development Engineer Intern

-São Paulo, São Paulo, São Paulo

Microsoft

How to save resources' IDs used by an activity and access them in O(1), assuming there could be an infinite number of resources?

Resposta

Respostas da entrevista

2 respostas

0

That took me a lot of time thinking, since, as far as I knew, that was impossible. It turned out that the answer he expected was using Hash Tables. I know that usually it works well and somewhere near O(1) but the worst case is still O(n), and as I was being probably more theorical than needed, it didn't lead me to the correct approach.

Confidencial em

0

Can you give us an example?

Answer em

Adicionar respostas ou comentários

Para comentar sobre isso, entre na conta ou cadastre-se.