Dassault Systèmes interview question

Leetcode Interview regarding graph algorithm