Questions tagged [recursion]
For question about the concept of a function calling itself, also known as recursion. It can also be used for recursive algorithms.
7 questions
4
votes
5
answers
282
views
Suggestions to improve my algorithm coding skills
I have a PhD in computer science (A fresh graduate). My bachelor's major is similar to CS but without algorithms (It's a discipline between business and CS).
I am quite good at AI research but my ...
5
votes
1
answer
179
views
Looking for good Master Theorem examples
I'm teaching an Algorithms class (junior/senior level), and we've just proved the validity of the Master Theorem. I'd like some good questions on it, both for homeworks and for exam questions. Problem ...
67
votes
21
answers
19k
views
What are good examples that actually motivate the study of recursion?
One of the traps of imperative-first is how difficult it becomes to help students make sense of recursion when they finally encounter it. And if those kids are fairly competent iterative programmers, ...
5
votes
2
answers
1k
views
Testing students on recursion - tracing by hand
After learning recursion in class, students take a test (a few lessons for teaching the subject, and then a test), and are then given a grade. The test is on paper, and I can't change that fact.
All ...
7
votes
6
answers
284
views
Where can a student independently learn elementary recursion, preferably in Java?
Normally, Java 2 is a prerequisite for my Computer Architecture course. I gave permission to a strong student who has only taken Java 1 to take Computer Architecture, provided that she learn the ...
30
votes
13
answers
6k
views
How to respond when students ask "is recursion good practice"?
Context: CS1-style, intro programming class, using an interpreted language (Python).
I will get a hand raised asking "Why are we learning recursion? Is it good programming practice?"
My response is ...
43
votes
31
answers
8k
views
Analogy for teaching recursion
When teaching recursion, what is the best analogy people use to teach the idea of recursion. There are some nice artistic representations
And the idea of repeatedly cutting a phone book or dictionary ...