Meta interview question

A leetcode problem about graphs