Docusign interview question

Basic Graph Problem and its variation