I think ther is some problem with the mark ,and the algorithm is correct