Java:
- Read more on eimacs about ADT interfaces in Java. The curriculum is focusing on LinkedLists and their implementation.
- They are now talking about adding a getPrevious() method to each node in addition to getNext(), which will allow you to traverse the List both backward and forward. The drawback of this would be a larger memory footprint.
What I always found so exciting about 2nd semester computer science is the real science, mathematics, and engineering principals you get exposed to, probably for the first time. Until now you spent most of your time learning about the syntax of the languages you were studying. Now that that is out of the way, you can get to the really fun stuff. Thinking about the trade offs between competing constraints and looking for ways to make the best choices among them. If moving back and forth in a list is something your application will do frequently, then the cost in maintaining pointers in both directions between nodes (a doubly linked list) may be worth the cost.
ReplyDelete