How To Find Local Maximum And Minimum On A Graph