I hope everybody had a great reading week! This week we learned about linked lists. I thought they were unnecessary, because why couldn't we just use trees? The linked list looked like a tree with the root being the value, and the child being the rest of list (subtree). It wasn't until after this week's lab that I realized how useful they are for storing data. The recursive iteration through the linked lists made it really efficient which I found out after we remade the queue class with the linked list instead of the list data structure. The enqueue times with linked lists were much faster and better than with the normal lists. However, I wonder what other good uses there are of linked lists...?
As for Assignment 2, when first looking at the instructions, I was really confused. I had no idea of exactly what the goal of the assignment was. However, after reading the lecture slides a few times over I realized how simple it was implement regex tree program. Recursion was very important in making the trees. Once I found out how to implement each root node, then call them recursively, and accordingly, each regex tree just built its self.
I really enjoy the assignments in this course, because they really force us to understand the material taught in the course.
No comments:
Post a Comment