Hello !!
This week we were
asked to write about our impressions of Week 8. Last week we learned about
Linked Lists. A linked list is linear sequence of nodes with a front and a
back. We thought of linked lists as a value and a sub-list and designed two classes
when writing code for Linked Lists in Python.
Linked lists are defined in a recursive way as each node contains a
reference to the next while containing a value of its own. In class, when
coding on Python, we designed two classes and used inheritance to connect them.
One class was dedicated to representing a single node while another was to develop
the linked list structure (i.e. it was a wrapper class).
We also learned to
traverse and mutate linked lists. Traversing a linked list was manageable for me
but learning to write code that mutates it was very difficult. But our
professors said that drawing out pictures when thinking of the code for a
specific method/function requiring mutating the linked list, would help us. I’ve
been trying to draw pictures when coding for such a function but am still
struggling with the concept. Hopefully, with enough practice, I’ll understand
linked list mutation better.
That’s all for this
post folks.Thank you !! =)
No comments:
Post a Comment