Sunday, March 8, 2015

Week 8 (The Rise of our TAs)

    Hi everyone! Hope you all had a great weekend! First of all, I,m really sad that the university has not come to an agreement with our TAs (CUPE1) and we don't have tutorials and labs until this issue is resolved! I think the effect is really bad on us SC students! I feel that now that the interaction between us and our TAs are gone in labs and help center, it is harder to grasp a good concept of every week's material, specially now that we only have a few more weeks left until our final exams and don't forget our test 2 on the upcoming Wednesday. I feel like, now more than ever we need to help each other and finish CSC148 like every other course strong! the lab07 solutions are now posted on Here and for the other labs, there are great students like my buddy Keirn who are posting solutions on their blog!

    Back to our topic of the week, "Link Lists"! working with trees and nodes prepared me for getting the whole idea of linked lists pretty fast! but when it came to implementing the functions in our lab07 exercises, I honestly was lost! what ever I tried, I failed all the doctests and it was really annoying! I spent 2 days and a lot of different ways to make those functions and methods work but I got nowhere! Finally yesterday afternoon after spending 3 hours with the lovely kids in our lil' strikers class, Tired of all the running and jumping around, I headed down to the library and started working on my program, hoping I can finish it by the end of the night! suddenly it hit me and I figured out what I've been doing wrong!
I was dealing with the values, like they are nods, I would do commands like:

- cur_node = lnk.front
  cur_node = value (oops you cannot do this bro!)

-what should I do then?
   cur_node.value = value! (yeap!)

-or another way is doing this:
new_node = LLNode(value)
cur_node = new_node
     
       

1 comment:

  1. A precise Slog to present linked list. Good work. It can be hard at first to grasp the lab functions. You just have to draw more and more diagrams.

    ReplyDelete