January 2024
Intermediate to advanced
480 pages
12h 36m
English

In this chapter, we’ll look at two problems that will require processing and answering questions about hierarchical data. The first problem is about collecting candy from a neighborhood. The second concerns queries on family trees. Because loops are a natural means to process collections of data, we’ll try them first. We’ll soon see, though, that these problems push against what we can easily express with loops, and this will motivate a shift in the way we think about and solve such problems. You’ll leave this chapter knowing about recursion, a problem-solving technique that applies whenever the solution to a problem involves ...
Read now
Unlock full access