An algorithm for the solution of the eigenvalue Schro¨dinger equation