Bloomberg Interview Question

Leetcode Medium graph question + follow ups (time complexity)