First Interview. What data structure to use, and how to solve the problem?
Anonymous
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.
Check out your Company Bowl for anonymous work chats.