Goldman Sachs interview question

Leetcode Gas Station problem. and an ambiguous graph problem.