Bloomberg interview question

The first interview was a leetcode easy, and the second was a leetcode medium graph traversal