From the course: Python: Recursion

Why recursion is important - Python Tutorial

From the course: Python: Recursion

Start my 1-month free trial

Why recursion is important

- In terms of day-to-day development, the amount you use recursion will vary by context. Some developers may make little or no explicit use of it, while for others, it will be a mainstay. Regardless, recursion is part of the very fabric of computing. And even if you don't use it explicitly in your everyday work, you can bet it's happening a whole lot behind the scenes. Here are some common applications of recursion in modern computing. Obviously a very important one is passing technical interviews so that you can get a good job or get a promotion. Things like traversing hierarchical data structures. Many powerful algorithms, such as Quicksort and depth-first search use recursion. It's also used in data mining. It's used in compilers and linkers, the evaluation of arithmetic expressions, databases. In fact, recursion is so important and useful that almost all modern programming languages support it. There is another aspect to why learning about recursion is important, too. You're also developing an important skill in your algorithmic thinking toolkit. Solving any nontrivial problem in computing involves finding ways to break complexity down into simple parts. Recursion is an excellent way to achieve this. And a solution can often be implemented in a function that's only a few lines long. So now we know some of the reasons why it's a great idea to learn about recursion. In the next chapter, we'll look at how to actually write recursive algorithms in Python. I'll see you there.

Contents