ThoughtSpot interview question

Rod cutting problem Some difficult question on graph i didnt remember