Pergunta de entrevista da empresa Bazaarvoice

6th onsite: Given a DAG graph, write an algorithm that traverses the graph and returns the first path from point a to point b or none if there is none. Extend that algorithm to return all paths. Extend that algorithm to sum the weight of the nodes in the path.

Resposta da entrevista

Sigiloso

11 de jun. de 2013

I was cranky by this point and kept making silly mistakes. He kept asking me to extend what was already sloppily written on the whiteboard, which made it easier and easier to make mistakes.