In this week, we continue to study tree, but not exactly the same material of the last week. It’s binary tree, a bit different from tree. We also learn how to implement recursive methods on binary tree. Danny talked about evaluate method and bst_contains method in class. Those are recursive methods, recursion codes can be helpful to eliminate the length of the codes we write and increase the correctness. These basic recursive methods implemented on trees are not very hard to understand in lecture, but this week’s lab is very tricky. I wrote the codes too long and cannot detest the error when i wrote it, the codes wouldn’t run because of it. lt might be that l didn't fully grasp the material of recursion and binary trees. I asked the TA for help frequently during the lab section and found the methods that asked us to implement were really difficult to write correctly, most of time they cannot run. But the quiz was easy for me.The TA was really nice, before the quiz he told us some answers of the lab exercise about the lab, he talked about list_longest_path() method which frustrated me quite al lot, this method is related about the recursion but much harder to figure out. With TA’s help, l was still lack of one method to fill out, l think l must spend extra time on the lab exercise and check my work this week.
No comments:
Post a Comment