Recursive Algorithm 1 Once upon a time there was a mountain, and there was a temple in the mountain. There was an old monk in the temple, and he was telling stories to the young monk! What's the story? Once upon a time there was a mountain, and there was a temple in the mountain.

2024/05/0200:08:33 technology 1871

recursive algorithm

1

Once upon a time there was a mountain, and there was a temple in the mountain. There was an old monk in the temple, and he was telling stories to the young monk! What's the story? Once upon a time there was a mountain, and there was a temple in the mountain. In the temple, there was an old monk who was telling stories to the young monk! What's the story...

2

Google company has the smartest programmer in the world. Not only are they smart, they also have their own "cold sense of humor" and originality. For example, if you don't know what "recursion" is, you might as well go to and Google to search for this keyword.

Then you will find that in addition to giving the necessary search results, Google also gives a prompt "Are you looking for: recursion", as shown in Figure 4-5.

Recursive Algorithm 1 Once upon a time there was a mountain, and there was a temple in the mountain. There was an old monk in the temple, and he was telling stories to the young monk! What's the story? Once upon a time there was a mountain, and there was a temple in the mountain. - DayDayNews

Figure 4-5 Google programmers’ “cold humor”

At first glance, you may think, is there something wrong with this Google search? I did, clearly, and without any mistake what I was searching for was "recursion". What else is it prompting? In fact, this is the "cold humor" of the programmers behind and Google search engine : if you click on the prompt "recursion", the search engine will search for "recursion" again - equivalent to calling itself - this is not correct Is this the essence of recursion?

Maybe you understand and smile knowingly, but you may still be confused: This is not right. All recursions have termination conditions. If we keep clicking on the prompt word "recursion", won't the query loop endlessly?

Don’t worry, you won’t keep clicking. Because this is the exit of recursion, the person who checked finally understands what recursion is and stops querying. And you are the one who understands.

technology Category Latest News