Bloomberg Interview Question

how would you implement BFS