> You probably want to use a problem that has fewer moving parts. Your instructor likely has a much nicer introductory problem so that you can learn the patterns of thinking through these problems.
Just to add: there are online resources you can use for this. Khan Academy, for example: https://www.khanacademy.org/computing/computer-science/algorithms. For self study, i can also recommend Introduction to Algorithms. https://mitpress.mit.edu/books/introduction-algorithms. When I'm using the term "subproblem", I'm mentally recalling the training I received from learning about recursion. Recursion is much more than about functions calling themselves. That is, if we've learned about recursion and thought: "why use recursion when you have loops?", then we've missed a key point, which is this: it's intended to teach how to think about subproblems and synthesizing from them. That's the answer I should have given to your question about thinking about subproblems. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor