Smart JS folks - this is why I can't pass the Google hiring test:

Given 2 to 3 arrays (it will either be 2 or 3, it can change), how would you return an array that only contains items in ALL the arrays.

Every solution I have found only seems to work w/ an array of simple values. I have an array of objects with a primary key, id.

Follow

@raymondcamden

Loop over number of arrays
For each item, output[item.id] = 1 if new else ++
Pool
Output all keys in output where value eq number of arrays

?

@falken last time they called i said - happy to interview, no code test. they said, sorry, we have to do that, when can i schedule the call, i said, no thanks, bye.

That being said, I wouldn't mind ending up there in DevRel some day...

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.