Teaching Algorithms to Develop the Algorithmic Thinking of Informatics Students

: Modernization and the ever-increasing trend of introducing modern technologies into various areas of everyday life require school graduates with programming skills. The ability to program is closely related to computational thinking, which is based on algorithmic thinking. It is well known that algorithmic thinking is the ability of students to work with algorithms understood as a systematic description of problem-solving strategies. Algorithms can be considered as a fundamental phenomenon that forms a point of contact between mathematics and informatics. As part of an algorithmic graph theory seminar, we conducted an experiment where we solved the knight’s tour problem using the backtracking method to observe the change in students’ motivation to learn algorithms at a higher cognitive level. Seventy-four students participated in the experiment. Statistical analysis of the results of the experiment conﬁrmed that the use of the algorithm with decision-making in teaching motivated students to learn algorithms with understanding.


Introduction
Programming, i.e., software development, is becoming increasingly important as it enables the integration of various technologies into an ever-widening range of human activities. According to Türker and Pala [1], computational thinking can be considered an ability that every individual should gradually have. For this reason, too, a considerable initiative is being developed to integrate programming into the teaching process from primary school onwards [2][3][4]. Along with the growing availability of personal computers, researchers have addressed the issue of linking the mathematics teaching and programming. Related to this, there was an effort to identify the way of thinking that students need to develop in mathematics teaching to increase their potential to program (compare: [5][6][7]). As early as the 1950s, the term "computational thinking" began to be used, which describes the use of structured thinking or algorithmic thinking to create a suitable output for a given input [8]. According to Wing [9], computational thinking is a type of analytical thinking that includes problem solving, system design and an understanding of human behavior based on informatics concepts. Computational thinking represents conceptualization rather than programming, basic skills rather than syntax skills, and human thinking based on creativity, not programmed computer thinking. Computational thinking is a way of thinking that is used to create systematic and repeatable problem-solving procedures and includes problem decomposition, pattern recognition, abstraction, and algorithmic thinking [9,10].
Indeed, research has shown that integrating the teaching of computational thinking into the teaching of mathematics subjects improves students' programming skills [11][12][13][14]. Given that algorithms form an intersection between mathematics and informatics [5], the teaching of algorithms can be used to develop algorithmic thinking, which can be considered a basic pillar of computational thinking. Algorithmic thinking is an important detail-oriented skill that is based on a person's cognitive ability to analyze problems, develop a sequence of steps leading to an appropriate solution, streamline an already known sequence of steps, and find alternative steps to solve a problem [15]. Algorithmic thinking is the ability of students to work with algorithms perceived as a systematic description of problem-solving strategies. The ability to think in algorithms and algorithmic procedures can be defined as one of the important educational goals in mathematics [16]. The importance of teaching algorithms is that students learn the logic of programming without any programming language. Using an algorithm, it is possible for a student to write the steps of processing a program in their own language, that is, they can create a flowchart of a program with so-called code [17]. Thus, algorithms form the basis of programming logic. As a result of this information, it can be stated that when teaching algorithms, the student acquires the logic of programming and begins to focus more on the problem-solving process. Knuth [5] pointed out that the attention paid to algorithms is common in algorithmic thinking, but not common in mathematics. Similarly, Kiss and Arki [18] found that the lack of algorithmic thinking disadvantages students in higher education. Their research has shown that traditional teaching strategies are unsuitable for developing algorithmic thinking. They emphasized the need for a strategic focus on algorithmic and computational thinking in teaching. To use the teaching of mathematics to develop students' algorithmic thinking, it is necessary to find suitable strategies to change the teaching and learning of algorithms. The aim of our research is to statistically verify whether solving the knight's tour problem using the backtracking method will cause a change in students' approach to learning algorithms.

Algorithms and Their Learning
An algorithm is a well-defined sequence of rules that provides guidance on how to create output information from input information using a finite number of steps [19]. Other authors refer to the algorithm as only some computational procedures, those that guarantee the solution of the problem, if the steps of the procedure are performed in the specified order and without errors [20,21]. The execution of the algorithm therefore has high reliability and speed, which is its strength, if the only goal is to solve the task. However, if it is the subject of teaching and learning, an algorithm executed without regard to its significance may lead to memorization. Algorithms are a basic and key part of mathematics. The problem is not the algorithms themselves, but the dominance of algorithmic solution templates in the teaching of mathematics [22]. This undesirable trend in teaching algorithms is because many teachers consider passing on finished algorithms to students as the main goal of teaching mathematics (e.g., [23][24][25][26][27]). With this goal, a mentality of mathematics teaching is formed, where students are "programmed" to solve a set of problems [28]. Students focus on memorizing algorithms because they give them a sense of security and believe that memorizing an algorithm and assigning it to a given task leads to success in mathematics [21]. However, those skilled in the art of mathematics agree that memorized algorithms are easy to forget, error-prone, and transmission-resistant (e.g., [29][30][31]). Already Brousseau's theory of didactic situations in mathematics [32] suggests that passing on finished algorithms to students robs them of their own intellectual work in learning mathematics, and that is why learning by imitating algorithms is ineffective. Fan and Bokhove [33] concluded in their literature review that this way of teaching mathematics leads students to a dichotomy between computational procedures and understanding. Two separate studies (Jonsson et al. and Wirebring et al. [34,35] have shown that learning mathematics through creative mathematical reasoning and constructing one's own solution methods can be more effective than if a teacher presents students with ready-made algorithms that they then try to emulate when solving tasks. Based on the above research, it is necessary to look for ways to teach algorithms that would lead to a change in the way students learn algorithms. It is necessary to teach algorithms, especially for students of informatics study programs, in such a way that they develop algorithmic thinking, the ability to solve problems and creativity, which is a sub-dimension of computational thinking [36]. As with learning generally, learning the algorithms of students in school mathematics can take place at different cognitive levels. According to Fan and Bokhove [33], learning and learning algorithms can be implemented at three mutually supportive cognitive levels. At the first cognitive level, it is possible to memorize the algorithm and then execute it in a comparable situation, but without real understanding. At the second cognitive level, there is an understanding of why the algorithm works. Based on this understanding, the student can apply the algorithm in a relatively complex situation. At the third cognitive level, the student can compare the algorithm with other algorithms (for example in terms of efficiency), evaluate the algorithm and create their own algorithm, while generalization is also considered to create a new algorithm. We explicitly distinguish between levels two and three in terms of understanding one particular algorithm and comparing several algorithms, because assessment is commonly perceived at a higher level of cognition as understanding (e.g., [37]). Cognitive levels two and three can be considered as levels where algorithms are studied. It is through the study of algorithms as general procedures that students gain the knowledge that mathematics is well structured [38], and its study brings a lot of benefits to the programmer.

The Role of the Knight's Tour Problem and Its Didactic Potential
The knight's tour problem is a chess and math problem. The knight moves according to the chess rules on the chessboard and the task is to visit each square exactly once. On a typical 8 × 8 chessboard, this task has a large number of solutions, of which in exactly 26,534,728,821,064 cases the knight ends up in the field from which the knight endangers the starting field [39]. The simplest algorithm for solving the Knight's tour problem is backtracking. Backtracking is a way of solving algorithmic problems based on searching the depth of possible solutions. This algorithm is an improvement over brute force solutions, as a large number of potential solutions can be ruled out without direct testing (more detailed, e.g., [40,41]). Backtracking is one of the return search algorithms that solves a specific problem not according to fixed calculation rules but based on trial and error. It is the presence of the trial-and-error method that can be used to change the perception of algorithms and thus the way students acquire them. Another "didactic" benefit of this algorithm is the fact that the process of trial and error is broken down into several subtasks, which are expressed in recursive terms and consist in examining the final number of subtasks.
An algorithm to solve the knight's tour problem can be created by defining the task that the algorithm has to solve. If we have a chessboard n × n, then the chessboard has n 2 squares and the knight must execute n 2 − 1 moves so that the knight enters each square exactly once. The task of the algorithm is to decide whether the next move can be performed. Its basic structure is an algorithm (Algorithm 1): In the next phase of algorithm creation, it is necessary to mathematize individual commands and conditions, so it would be possible to program the algorithm and then debug it. For example, we replace the condition "chessboard is not full" with the expression i < n 2 ; we write the position of the knight using local variables u, v; the predicate "acceptable" using a logical combination of 1 ≤ u ≤ n and 1 ≤ v ≤ n, etc. The resulting algorithm for solving the knight's tour problem on the chessboard can be found e.g., in [42].
An essential characteristic of the above solution to the knight's tour problem on the chessboard is the fact that the individual steps, based on which we proceeded to solve the problem, were first examined, and recorded by error using the trial method. In the case of a "dead end" that does not lead to a result, it is possible to delete the wrong part of the solution and return to the position where we went in the wrong direction when looking for a solution. It is the use of the trial-and-error method that makes unexpected elements of the algorithm for students that can encourage them to change the way they learn algorithms. We consider the finding that even the right algorithm can lead to a "dead end" as an element that will strongly disrupt students' perception of algorithms as a safe and trouble-free way to solve the problem.

Method
In agreement with the students of informatics at the bachelor's degree level, we conducted an experiment within the seminar algorithmic graph theory. We devoted four lessons to the knight's tour problem, which were beyond the scope of the seminar's teaching hours. Experimental teaching took place in the fourth and fifth week of the semester without changing the teacher. We solved the problem based on a scheme established in 1910 by J. Dewey ( Figure 1).
if unsuccessful then delete previous record end end until (move was successful) ∨ (there are no other candidates) end.
In the next phase of algorithm creation, it is necessary to mathematize individual commands and conditions, so it would be possible to program the algorithm and then debug it. For example, we replace the condition "chessboard is not full" with the expression < 2 ; we write the position of the knight using local variables u, v; the predicate "acceptable" using a logical combination of 1 ≤ ≤ and 1 ≤ ≤ , etc. The resulting algorithm for solving the knight's tour problem on the chessboard can be found e.g., in [42].
An essential characteristic of the above solution to the knight's tour problem on the chessboard is the fact that the individual steps, based on which we proceeded to solve the problem, were first examined, and recorded by error using the trial method. In the case of a "dead end" that does not lead to a result, it is possible to delete the wrong part of the solution and return to the position where we went in the wrong direction when looking for a solution. It is the use of the trial-and-error method that makes unexpected elements of the algorithm for students that can encourage them to change the way they learn algorithms. We consider the finding that even the right algorithm can lead to a "dead end" as an element that will strongly disrupt students' perception of algorithms as a safe and trouble-free way to solve the problem.

Method
In agreement with the students of informatics at the bachelor's degree level, we conducted an experiment within the seminar algorithmic graph theory. We devoted four lessons to the knight's tour problem, which were beyond the scope of the seminar's teaching hours. Experimental teaching took place in the fourth and fifth week of the semester without changing the teacher. We solved the problem based on a scheme established in 1910 by J. Dewey ( Figure 1). The use of this scheme allows students to be involved in creating a solution to the problem-creating an algorithm. During the individual phases, they were emphasized what solving skills are needed to master the individual stages of problem solving. At the last (fourth lesson) the students had the task to program the created algorithm.
When enrolling in the second year of bachelor's studies, we asked students if they would be willing to participate in the experiment. The course and goal of the experiment were presented to the students and they were assured of the anonymity of the obtained results. Out of 198 approached students, 74 students at the age of 20 voluntarily participated in the experiment. The aim of the experiment was to verify whether the use of the search strategy with return-backtracking to solve the problem of the so-called "fun math" the knight's tour problem motivates students to change the way they learn algorithms. Based on the stated goal of the research, we expressed the following working hypothesis: The use of this scheme allows students to be involved in creating a solution to the problem-creating an algorithm. During the individual phases, they were emphasized what solving skills are needed to master the individual stages of problem solving. At the last (fourth lesson) the students had the task to program the created algorithm.
When enrolling in the second year of bachelor's studies, we asked students if they would be willing to participate in the experiment. The course and goal of the experiment were presented to the students and they were assured of the anonymity of the obtained results. Out of 198 approached students, 74 students at the age of 20 voluntarily participated in the experiment. The aim of the experiment was to verify whether the use of the search strategy with return-backtracking to solve the problem of the so-called "fun math" the knight's tour problem motivates students to change the way they learn algorithms. Based on the stated goal of the research, we expressed the following working hypothesis: H1. The implementation of backtracking into the teaching of algorithms motivates students to learn algorithms at a higher cognitive level.
At the beginning of the first lesson of experimental teaching of the algorithmic graph theory seminar, we asked students to fill in an anonymous questionnaire, which was created by members of the research team. The questionnaire contained eleven items (questions). The students filled in the questionnaire before the start of the experiment (pre-test). The same questionnaire was filled in by the participants of the experiment after the end of the last fourth lesson of the experiment (post-test). A total of 74 respondents participated in the experiment. Students answered the answers to the individual questions of the questionnaire from a scale of 1-5, where 1 means "least important" and 5 "most important". The aim of the questionnaire was for students to evaluate the importance of individual activities in learning algorithms on the scale. The questions in the questionnaire are divided according to three cognitive levels of learning algorithms according to [33]. Three evaluated activities were dedicated to each cognitive level. Two questions of the questionnaire were aimed at finding out whether students prefer learning based on sample examples or the theoretical basis of the algorithm when learning algorithms.
We were interested in whether there were differences in the answers to individual items in the pre-test and in the post-test and if so, whether these differences are also statistically significant. We used the Stuart-Maxwell test to determine the statistical significance of differences in students' responses to individual items in the pre-test and post-test.

Description of the Method
The Stuart-Maxwell test [44][45][46][47], a score-type test, is an extension of McNemar's test [48] to the situation where responses are allowed more than two response categories.
For the general matched-pair data summarized in an r × r square contingency table (Table 1) with total sample size n, we denote the probability of falling in to the ith row and jth column as p ij , and we define the marginal probabilities p i· = r ∑ j=1 p ij , i = 1, 2, . . . , r, and We usually write by using the probability table (Table 2), which is generally in the form below. Also, we denote the corresponding number of observations in the associated cases as n ij , n i· , and n ·j , respectively.
We have To test the marginal homogeneity of the two sets of probabilities, we are interested in assessing the hypothesis H 0 : p 1· = p ·1 , p 2· = p ·2 , . . . , p r· = p ·r .

Data Analysis and Results
Using the Stuart-Maxwell test, we tested the null hypothesis H 0 , which expresses that the probability of occurrence of the considered activity is the same before and after the experiment. We will test at a significance level of α = 0.05. We performed the Stuart-Maxwell test using the STATISTICA program. After entering the input data in the output set of the computer, we received a contingency table for each item and the value of the test criterion of the Stuart-Maxwell test (Table 3). We will compare the value of the test criterion Q with the critical value χ 2 0.05 (4) = 9488 We rejected the tested hypothesis H 0 at the significance level α = 0.05, if the value of the test criterion Q is greater than or equal to the critical table value (9488). Based on the results shown in Table 3, we can see that within cognitive level 1 there were statistically significant changes in the answers to questions no. 1 and no. 9. A statistically significant difference in the answers to no. 1 (when learning algorithms, I consider it important to remember the algorithm as a whole). in the pre-test as in the post-test illustrated in Figure 2.

Data Analysis and Results
Using the Stuart-Maxwell test, we tested the null hypothesis 0 , which expresses that the probability of occurrence of the considered activity is the same before and after the experiment. We will test at a significance level of α = 0.05. We performed the Stuart-Maxwell test using the STATISTICA program. After entering the input data in the output set of the computer, we received a contingency table for each item and the value of the test criterion of the Stuart-Maxwell test (Table 3). We will compare the value of the test criterion with the critical value 0,05 2 (4) = 9488 We rejected the tested hypothesis 0 at the significance level α = 0.05, if the value of the test criterion is greater than or equal to the critical table value (9488). Based on the results shown in Table 3, we can see that within cognitive level 1 there were statistically significant changes in the answers to questions no. 1 and no. 9. A statistically significant difference in the answers to no. 1 (when learning algorithms, I consider it important to remember the algorithm as a whole). in the pre-test as in the post-test illustrated in Figure 2. In Figure 2 we can see that in the pre-test up to 80% of students considered remembering the algorithm as a whole to be very important, but in the post-test, this activity in learning algorithms was considered very important by only 28% of students. A similar decrease in the importance of the answer in the post-test compared to the answers in the pre-test was also recorded in the case of question no. 9 (when learning algorithms, I consider it important to solve more similar tasks to use a memorized algorithm). There was no change in importance in the ability to know how to assign an algorithm to a given Mathematics 2022, 10, 3857 7 of 13 task (question no. 5). Students consider this ability to be very important in both pre-test and post-test.
Within cognitive level 2, there were statistically significant changes in the answers to questions no. 2 and no. 10. There was a statistically significant difference in the answers to question no. 10 (when learning algorithms, I consider it important to be able to use the whole algorithm in more complex tasks), in the pre-test as opposed to the post-test, illustrated in Figure 3.
In Figure 2 we can see that in the pre-test up to 80% of students considered remembering the algorithm as a whole to be very important, but in the post-test, this activity in learning algorithms was considered very important by only 28% of students. A similar decrease in the importance of the answer in the post-test compared to the answers in the pre-test was also recorded in the case of question no. 9 (when learning algorithms, I consider it important to solve more similar tasks to use a memorized algorithm). There was no change in importance in the ability to know how to assign an algorithm to a given task (question no. 5). Students consider this ability to be very important in both pre-test and post-test.
Within cognitive level 2, there were statistically significant changes in the answers to questions no. 2 and no. 10. There was a statistically significant difference in the answers to question no. 10 (when learning algorithms, I consider it important to be able to use the whole algorithm in more complex tasks), in the pre-test as opposed to the post-test, illustrated in Figure 3. In Figure 3 we can see that in the pre-test, up to 81% of students consider the ability to know how to use the algorithm in more complex tasks to be insignificant. In the posttest, however, students were statistically significantly more inclined to believe that it is important to master the algorithm so that they can use it in solving more complex tasks. The same change was noted in the perception of the importance of the need to understand the individual steps of the algorithm (question 2). In the case of question no. 6 (when learning algorithms, I consider it important to analyze the algorithm to find out why it works), students consider this activity to be of little importance in the pre-test as well as in the post-test.
Within cognitive level 3, there were statistically significant changes in the answers to questions no. 3 and 11. There was a statistically significant difference in the answers to questions no. 3 (when learning algorithms, I consider it important to be able to adapt the algorithm to the problem) in the pre-test as opposed to the post-test, illustrated in Figure  4. Respondents' answers to question no. 10 (when learning algorithms, I consider it important to be able to use the whole algorithm in more complex tasks) in pre-test and post-test (in%).
In Figure 3 we can see that in the pre-test, up to 81% of students consider the ability to know how to use the algorithm in more complex tasks to be insignificant. In the posttest, however, students were statistically significantly more inclined to believe that it is important to master the algorithm so that they can use it in solving more complex tasks. The same change was noted in the perception of the importance of the need to understand the individual steps of the algorithm (question 2). In the case of question no. 6 (when learning algorithms, I consider it important to analyze the algorithm to find out why it works), students consider this activity to be of little importance in the pre-test as well as in the post-test.
Within cognitive level 3, there were statistically significant changes in the answers to questions no. 3 and 11. There was a statistically significant difference in the answers to questions no. 3 (when learning algorithms, I consider it important to be able to adapt the algorithm to the problem) in the pre-test as opposed to the post-test, illustrated in Figure 4.  In Figure 4 we can see that the ability to adapt the adopted algorithm to the solved problem was considered important only by 21% of students in the pre-test and up to 58% of them considered it to be of little importance. In the post-test, 45% considered this ability In Figure 4 we can see that the ability to adapt the adopted algorithm to the solved problem was considered important only by 21% of students in the pre-test and up to 58% of them considered it to be of little importance. In the post-test, 45% considered this ability important and only 30% considered it unimportant. Even in the case of question no. 11 (When learning algorithms, I consider it important to be able to build my own algorithm.) there has been a similar change in the evaluation by students. In the pre-test, they rated this ability mostly as very unimportant, but in the post-test, they mostly rated it as important.
Through question no. 4 (when learning algorithms, I consider it important to have a model example, based on which I will learn the algorithm) and questions no. 8 (when learning algorithms, I consider it important to have a theoretical description of the algorithm), we looked at what resources students consider important when learning algorithms. Pre-test and post-test results for question no. 4 are listed in Table 4 and for questions no. 8 in Table 5 (Tables 4 and 5 are contingency tables expressed in %).  Given that the calculated value of the test criterion in both cases is less than the critical value χ 2 0.05 (4) = 9488, at the significance level α = 0.05 we cannot reject the null hypothesis H 0 . This means that the probability of occurrence of the considered learning sources is the same after the implementation of the experiment as the probability of occurrence before the implementation of the experiment. The observed differences are not statistically significant. From contingency table (Table 4), we see that students in both pre-test and post-test consider it very important that when learning algorithms, they have a sample example for the use of the algorithm. Based on contingency table (Table 5), we can state that students consider to have only a theoretical description of the algorithm to be of little importance.

Discussion
Due to great advances in science and technology, some algorithms are almost obsolete and in practice more attention is paid to the construction of new, often more complex algorithms. This progress requires the introduction of new concepts and ways of computational thinking [49], which also places new demands on the teaching of mathematics and informatics. According to Araya et al. [50] students may not be very skilled in using basic arithmetic algorithms to perform long divisions by large numbers. This frees up space in teaching for teaching new concepts and algorithms, which are increasingly important for the development of computational thinking.
Based on the analysis of the results obtained in the pre-test, we can state that before solving the knight's tour problem, the students considered those activities that correspond to the first cognitive level of learning algorithms to be important when learning algorithms [51]. Activities that correspond to the second and third cognitive levels, according to [33], were considered to be of little importance. The results also show that students at the beginning of the seminar algorithmic graph theory preferred to master algorithms without understanding. This result corresponds to the research of [52], who found that students rely on memorized procedures and rules that they often learn without understanding. Several studies confirm that if a student has a template of solutions-learned algorithms, they try to use them [27,53,54]. This way of learning algorithms and their use in solving problems leads students to believe that mathematics is a subject where it is necessary to memorize a lot of definitions and algorithms [55].
By analyzing the results of the post-test, we concluded that the inclusion of a solution to a more demanding but didactically rich problem (in our case, the knight's tour problem) has the potential to encourage students to change the way they learn computational algorithms. Statistical analysis of the differences in students' answers to the same questions in the post-test and pre-test confirmed that there is a statistically significant decrease in the importance of activities that correspond to the first cognitive level. At the same time, the importance of activities corresponding to the second and third cognitive levels of learning algorithms has increased statistically significantly. In doing so, we came to the same conclusions as Laudano et al. [56] that the learning of algorithms may in individual cases take place at various levels simultaneously and not necessarily in a gradual manner from a lower cognitive level to a higher level. To achieve this goal, a suitable choice of tasks in the teaching of mathematics is needed [57].
In the post-test, the students considered remembering the algorithm as a whole (item 1) and practicing it (item 9) to be important, but not as important as it was in the pre-test. We think that this statistically significant decrease in the importance of these activities is related to the increasing importance of understanding the individual steps of the algorithm (item 2) and the ability to use the algorithm in more complex tasks (item 10). While in the pre-test the students rated these activities as unimportant, in the pre-test they evaluated them as important. The assessment of the ability to adapt the algorithm to a new task (item 3) and to be able to construct one's own algorithm (item 11) has also changed. If some of its steps are forgotten, they can reconstruct the algorithm [33]. We find it interesting to find out that students in both pre-test and post-test consider it very important to be able to assign an algorithm to a given task (item 5). This result points to the fact that students in learning mathematics are focused on solving problems, so they prefer problems that are solved using algorithmic methods. Their effort in solving it is reduced to the correct application of the algorithm leading definitely to the expected result [58,59]. This approach to problem solving is supported by the prevailing linearity of problem solving. Most school assignments are built in such a way as to encourage students to follow a structured, hierarchical, and linear path to the outcome. Therefore, it is not surprising that they feel less confident if they are to address a problem where this sequence is disrupted [60]. Therefore, we consider it appropriate that students have more experience with tasks whose solution procedures contain elements of heuristics. A trial and error "heuristic" was used to solve the knight's tour problem. For example, the trial-and-error strategy is a strategy without high cognitive demands, which is commonly used in mathematics lessons and in everyday life [61]. Therefore, this strategy is suitable for students becoming acquainted with the elements of heuristics, and its use requires problem analysis and understanding of the algorithm creation process [62]. By using heuristics within algorithms, students will gradually come to the realization that the certainty offered by the algorithm is stronger if they acquire the algorithm with understanding. Thus, it is possible to achieve the integration of students procedural and conceptual knowledge, which brings an increase in their success in solving tasks [37,63,64].
Even though the knight's tour problem contains heuristics and the need to atomize the task, students in both pre-test and post-test consider it unimportant to analyze the algorithm and be able to evaluate the possibilities of its use in various problems. Although assessment and analysis are commonly perceived at a higher level of cognition than comprehension (e.g., [37]), there are probably more factors behind students' attitudes related to the way mathematics is taught. For example, Fuson [65] emphasizes the problem of an overemphasis on instrumental knowledge at the expense of relational knowledge in teaching. According to Benton [66] the obligation to follow a given method could hinder the development of children's thinking and discourage logical thinking. We consider students' lack of interest in solving long and complex tasks to be an equally key factor [67]. These factors cause students to have a strong concentration on mastering the algorithm in order to achieve success in solving problems. This concentration was also shown in the responses to items 4 and 8, where they consider it very important to have a model example, but for them it is of little importance to have a theoretical description of the algorithm. This can be interpreted as meaning that when students learn algorithms, they prefer to imitate the finished algorithm before thinking and creating their own algorithm. According to Araya et al. [49], it is appropriate to use more complex and advanced tasks in the teaching mathematics, which require creative procedures at the expense of the linearity of the solution. Because even more complex tasks within their analysis can be divided into simpler tasks-the task of atomizing. Atomization then leads to the solution of simple subtasks, which students prefer. This type of task is also the knight's tour problem on the chessboard. In our research, we focused on verifying the motivational potential of student involvement in the creation of a more complex computational algorithm, which is also a limiting factor in the interpretation of results. In further research, it would be necessary to investigate to what extent it is possible to implement more complex algorithms in the teaching of mathematics and what way will lead to the acquisition of computational algorithms at higher cognitive levels.

Conclusions
Based on the research, we can state in conclusion that the development of computational thinking of students is already possible in the teaching of mathematical subjects. The implementation of the solution to the knight's tour problem to the seminar and the subsequent analysis of the implementation confirmed that it is not necessary or appropriate to only pass on the finished algorithms to students. It was the students' involvement in creating the algorithm that encouraged students to change the way they learn algorithms. The decision-making and return algorithm have proven to be suitable to disrupt the prevailing linearity of algorithms that students are accustomed to in the normal teaching of mathematics. In the future, it might be appropriate to experimentally examine which elements of algorithms have an impact on changing the way algorithms are acquired. This could provide additional important data for the development of computational thinking in teaching mathematics.