How To Find Local Minima And Maxima From A Graph