This week in class we learned about trees (specifically binary trees) and how to code them using recursion. A tree consists of nodes that may or may not contain children. Nodes that contain children are known as internal nodes. Every tree starts at the root, or otherwise, known as the initial node. A tree can consist of simply one node or a million nodes, and each can have any number of children.
I always found trees to be one of the simpler ideas to implement in CSC148. The problem I had last year was coding the recursion that was used in every tree method we defined. Now trees and recursions are something I fully understand. I have to give credit to my TA Phillip Konkulak for probably being the one person who has helped me in this course the most. Each and every lab, we recap what was learned in that week and code it during our lab exercises. On top of that, Phillip would come around answering questions and making sure we understand what were doing.
This week's lab material was probably the most difficult one, but with the help of my TA, I understood it in no more than 15 minutes.
No comments:
Post a Comment