DSA: graph-based optimization problem · InterviewLane