Thursday, 10 March 2016
It Just Got More Complicated: Trees, Linked Lists and Recursion
Previously, I have been introduced to recursion and learnt about linked lists. During this week, we talked about trees and how they can be created in python by using linked lists. The tree can then be accessed and tweaked with methods that use recursion. This topic is very challenging for me. I understand and have done many examples on linked lists, but recursion is something that I need to work on. As we go through more challenging and complicated functions that require recursion, I become confused and overwhelmed. For instance, the quiz I had today was asking to implement a function that counted the number of nodes in a tree. I am confident that I implemented the base case correctly, but when it came to the recursive step it became difficult. I became even more frustrated afterwards while I was walking home. This is mainly because I suddenly knew the answer and realized my foolish mistake near the end of my code. To prevent this, I am going to do many examples tomorrow and test them thoroughly. Sometimes when I am asked about a confusing topic I forget to look over my work and I just hand it in. That cost me today. I also know that my midterm for csc148 is next week and I will ensure that I don't repeat this mistake. As I previously mentioned I will do many examples and practice! Practicing is the only way I can do better and develop the skills that I need to become a good programmer.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment