MC21 Permute a sparse matrix to put entries on the diagonal
Given the pattern of nonzeros of a sparse matrix this subroutine attempts to ﬁnd a
row permutation that makes the matrix have no zeros on its diagonal. The method
used is a simple depth ﬁrst search with a look ahead.