C Language Programming is an important professional basic course for computer majors in colleges and universities, and is an introductory course for learning programming technology, which is helpful for improving students' computational thinking. This paper introduces the classical problem Hannover Tower, through the solution of the Hanoi problem, excavates the mathematical rules of its connotation, and derives a series of mathematical formulas to help students understand the idea of non-recursive algorithms. Through the model described in the article to find out the movement law of each disk, it can be seen that the non-recursive solution is exactly the same as the traditional recursive solution in the disk movement, but this algorithm is more efficient and occupies less store space.
|