Pergunta de entrevista da empresa Amazon

First Interview. What data structure to use, and how to solve the problem?

Resposta da entrevista

Sigiloso

11 de abr. de 2011

Hash table, with each entry having pointers to the parents. You loop the hash table, and the ones that don't have parents are the jobs that you schedule first, then the ones that had those as parents, and so on.