A bisection algorithm for the numerical mountain pass