Pergunta de entrevista da empresa X

Given two lists, return a list of elements that appear in both.

Respostas da entrevista

Sigiloso

11 de out. de 2017

I initially was using a hashmap to store all the elements and keep track of the repeats, but this was inefficient. Later I changed to keeping track of the indices in each list after.

1

Sigiloso

17 de jan. de 2021

There's quite an extended back and forth in actual interviews for questions like this, so nothing quite like real practice. The Prepfully Twitter Software Engineering experts have actually worked in this role, so they're able to do an honest-to-God accurate mock, which really puts you through the paces. prepfully.com/practice-interviews