KMT algorithm, does not pass