A NEW ALGORITHM FOR DIAGONALIZING LARGE HAMILTONIAN MATRICES AND ITS APPLICATION TO NUCLEAR SHELL MODEL