Revisiting Slogs
In this term's csc148 course, we have developed our skills in python, and the most important thing we learned is recursion.
In past several weeks, I wrote slogs about impression every week. In my opinion, I agree with most of what I write especially the concepts and examples used in the class.
At first, we learned the recursion through simple examples for lists of lists. These examples aimed at create a basic impression of recursion.
However, we mainly learned the recursion through tree and linked lists. As far as I concerned, the most efficiency way to think a recursion method is draw this specific tree, and figure out what nodes(or parents) and leaves(or children) are. What's more, we must ensure that every instance used in the class is understood before we write any method in class.![]() |
| __init__ method for BTNode which represents a binary tree. |
Compare with my friends' experience, I prefer to write codes after drawing the picture of a tree or linked lists on paper. Because this could help me figure out each steps of each method, I can easily write codes through that specific tree.











