Determinant-based configuration interaction algorithm