Pergunta de entrevista da empresa Bloomberg

Describe an algorithm to find mutual friends on Facebook.

Resposta da entrevista

Sigiloso

25 de abr. de 2011

Say you want to find mutual friends for A and B. Perform a BFS at A and enter all nodes into a hashtable. Similarly perform a BFS at B and find the collisions

1