I have read what prof posted about Linked Lists, and thought it was very straight forward after actually trying to code some of the linked lists exercises.
In the tutorial, we had to implement class Queue. It was a bit tricky at first, but once I realized that I needed to go about from both front and back direction, the coding became a lot easier to do.
The tree.py code posted took a long time to get my head around though.. the nested functions were very unique, and on top of that the nested functions had a recursion of itself. I don't know if it's just me, but I couldn't do all that in my head.. so I had to draw and follow everything using a set of examples. I put it in the visualizer.. but wow... it makes it so confusing, or should I get used to that, I'm not sure. But once I got it, it was a very good feeling :).
No comments:
Post a Comment