I only need this help: carefully read it and try to understand it. If you cannot understand it, tell me why and where? And tell me how to revise the expression to make it easy to understand. Thank you very much!
1, if you enter my stream of thoughts, then you can find that the algorithm is correct.
2, I gave the much detailed algorithm, if you program the algorithm carefully and correctly, you can believe that the algorithm is correct.