This week my partner and I worked on creating a regex tree class for assignment 2 part 1. At first we decided to create one big class that would allow the different characteristic of each regex to be inputted, however we later heard Danny say how that could be inefficient so we decided to change it. We spent maybe an hour rehabbing our code to split it into several smaller tree classes by using inheritance, but overall we found this assignment pretty easy.
In lecture, we began taking a closer look at linked lists. Linked lists are lists made up of an item and the remaining list of elements. So for example, if you created a new list it would be LinkedList() and if you added an element into it, it would be LinkedList(5, LinkedList()), and after adding a new element it would look like LinkedList(3, LinkedList(5, LinkedList())). This took me a little while to get used to, as once you get into a list with 10 elements it gets a little harder to keep track of all the trailing lists. At first I was a little uncomfortable with the idea of working with linked lists, but after working through the lab in week 8 I definitely became much more comfortable with the concept. In further lectures we looked at various functions that were included in linked list such as delete_front, reverse, insert, etc.
No comments:
Post a Comment