How To Find Maximum Profit On A Graph