Stacks
I'm guessing the whole idea of a stack is to get us acquainted with thinking of programming problems as object based as possible. This week's parenthesis example was perfectly suited to the idea of a 'stack'; due to the scaling aspect of the stack as well as the intuitive nature of the solution. Because functionally speaking, you could do pretty much the same things you could do with a stack with a simple list. The usefulness will probably increase drastically for more complicated programs that require some kind of Last in first out storage system - a stack / sack class will certainly reduce the headaches of rewriting code over and over again.
Linked Lists
The professor went into some detail about why Linked Lists have certain advantages over regular lists using interactive activities. I truly appreciated a hands on teaching method as Linked Lists are quite abstract not to mention completely new concepts even for former 108 students.
Even though it's in C++, one could abstract from it the general idea behind nodes/linked lists very easily.
Another video I found particularly helpful is this one by Joe James from youtube. This video is specific to Python:
I hope we get enough guidance so that we can be as fluent with recursive solutions as we already are with the loop variants.
No comments:
Post a Comment