Image (including dynamic graph) is an efficient way of transmitting information, which can enhance the response intensity of imagery, memory and thinking. The so-called picture wins thousands of words, that is the truth.
Today, we have compiled 10 sheets of GIFs to help you understand the specific operation of the concepts of cyclic, recursive, and binary retrieval. Code instances are written in the Python language.
First, the circulation
GIF 1: The simplest while loop
GIF 2: Loop with If/else
Second, recursion
GIF 3: A direct demonstration of the concept of recursion
GIF 4: Recursive code example
GIF 5: Recursive Fibonacci sequence
GIF 6: Recursive factorial (there's something wrong with the indentation in the picture, please ignore it)
Third, pass by value and pass by reference
GIF 7: The difference between passing by value and by reference
Iv. linear search and binary search
GIF 8: Linear retrieval and binary retrieval for 23 position
GIF 9: Linear retrieval and binary retrieval for 1 position
GIF 10: Two-point search tree
Link: http://codingpy.com/article/10-gifs-to-understand-some-programming-concepts/(click the end to read the original)