J.P. Morgan Interview Question

Complicated Graph Traversal with several conditions