How To Find Local Minimum And Maximum From A Graph