3 ms·
I am confident, from remembering the troubles other students had when recursion was introduced, that recursion is indeed very difficult for some students. I'm
by readthenotes1 3y ago
I am confident, from remembering the troubles other students had when recursion was introduced, that recursion is indeed very difficult for some students.
I'm not even sure that iteration was easy for them.
Just because it is easy for one person does not make it easy for another. There are some people who love high school geometry and hate high School trigonometry, and vice versa, because the former deals with proofs for the most part and the latter deals with application (at least when I was taught it).
- Izkata 3y agoProbably because it's taught badly. From one of the other responses: > you just need to assume the sub-calls do the correct thing. This is technically correct (and I remember hearing it when first learning recursion), but it's not useful. The two most common problems were not having a good stopping condition, and handling two or more levels per call because they didn't understand at what point the function should call itself. I think the first thing that needs to happen is just draw a diagram of common data structures and show how they can be looked at as a recursive data structure. Like a tree is a node and two more trees, or a list is a node and another list. As odd as it may sound to some people, I think starting with something that has a visual representation like that (even if it's more complicated in code) is easier to understand than pure math like recursive fibonacci. This would also double as an answer to the "why would I use this when I can just use a loop?" question. Just challenge the student to walk a tree with loops instead of recursion to see how much more work it is.