ThoughtSpot Interview Question

Rod cutting problem Some difficult question on graph i didnt remember