Binary tress were a concept completely new to me. Since it built on previous ideas it wasn't entirely confusing to follow in lecture as to how to set one up. Although. I think for me to do it on my own an apply the concept to a new program would be confusing. From what I understood, the basis of a tree lies in a list of other trees, where the value is an input of the root, separate from the list. It was easier to understand how to go about manipulating a binary tree afters seeing it written out as a TreeList. This concept seemed similar to the idea of nested lists, and that's how I figured how to incorporate recursion, as you would be calling whatever function you write on each child of the root, and multiple times thereafter in order to access each child of each node.
No comments:
Post a Comment