Question d’entretien chez eBay

Graph question from Leetcode top 100