Recursive Algorithm and its Practice in C Language Online Course Teaching
The recursive algorithm has two core issues which are the design of recursive parameter lists and exit condition. We summarized the types and characteristics of recursive algorithms, and extracted four types of representative recursive algorithms with different levels of difficulty. Pseudocodes of these algorithms are given and the core issues complexity of these algorithms is compared. The relatively complex and representative recursive algorithm of the maze path finding is described in detail. The description includes that the maze is expressed mathematically, using numbers from 0 to 9 to represent the path cost, using * to represent walls or obstacles, and abstracting the maze problem as a square maze represented by numbers and *. The maze path finding recursive algorithm has five steps which are the storage structure of the maze numbers and *, the consideration of the two core problems of the recursive algorithm, the recursive call in the four directions of the middle point and the printing of the maze path. The screenshot of the running result in C language is showed. Students are required to implement the maze path finding recursive algorithm in C language. Because the maze path finding recursive algorithm is interesting and challenging, it can stimulate students' enthusiasm and initiative in learning. In the current situation of online course teaching during the epidemic, considering the demand for C language programming ability, combining with the characteristics of higher vocational students and the difficulty of the maze path finding recursive algorithm, we designed and practiced the C Language online course teaching mode led by the recursive algorithms. The every step of the teaching mode is described in detail. From the feedback of students’ evaluation of teaching and teacher’s evaluation of learning, this teaching mode is praised by teachers and students.