Monday, March 23, 2015

Impression of Week 9

     I have nothing much to talk about week 9.
I had a second midterm test which was about tree, BTNode , BST and LLNode.
Since we had no labs due to strike, I was not confident about the material.
I know my professor will find a way to grade students efficiently, but i still worried about that the lab, quiz and this SLOG, that i put so much effort on, would not be graded in the worst case.

     I am not supporting the strike and also not against to the strike.
I just hope that they can make an agreement as soon as possible so that all the students in u of t, including myself, can have fair opportunities to learn with students in other universities.
Some of my tuition will go for taking lab, tutorial, and grading works so I can reflect my mistakes and learn from it.
However, I was not able to take lab and quiz regardless of my decision. 
I know that TAs are fighting for their own piece and fairness, but i also know a lot of students are suffering from absence of their TAs. 



Friday, March 20, 2015

Impressions of Week8.

    In this post, i will summarize the “Linked list” because i feel I get lost in this week.


LLNode


Linked list is data structure which has node(data) and link connecting each nodes .
Each node also contains “reference address”(This is just for my understanding. Not formal vocabulary describing LLNode.) which tells the next node.

LLNode is generally considered as “Recursive data structure”.
The node can have next data (node.next) or it can be simply a single node contains single value in which node.next is None.

According to this code, self.cargo is the value of the node and self.next is reference address. 

This is how you make node1, node2, and node3 with value 1 , 2 and 3 respectively.
If i visualize this sturcture, I can come up with something like this. 


As you can observe, the nodes are not connected to each other, they are just three single nodes.
If I want to make them to be connected, I can do this by assigning node2 as node1.next and node3 as node2.next. 


Then I will come up with this kind of data structure! 

In the last blog post, I said ‘I don’t understand why people made this kind of data structure since we already have “List” object.'
However, now I totally get why this data structure has been developed and realized that this LLNode is totally different concept compare to list object.
We can take some advantages from LLNode :
  • You never run out of room and have to copy to a new location.
  • Adding & deleting in the middle of the list is simpler.
As always, however, there are some disadvantage if there are advantages!!!
    - NO random access!
    - Finding list element N is slower when N is large.


Friday, March 13, 2015

Impressions of Week 7

From week 4 or 5,  I’ve started learning about recursion.
As mentioned before on my post, I am pretty impressed by how recursion methods work.
I am very interested in solving recursive problems although I felt they are not fully understandable.
Trees, BTNode, BST, and even LLNode, they are all about recursion.
Trees are my favorite parts, so do BT and BST.
They have exactly the same features except for only few things.
Tree is a data structure that emulates a tree design with a set of linked nodes.
The reason why I like it the most is because i can easily capture the idea.
Which means that I can guess the appropriate algorithm by just looking at the structure. 
My understanding of BT and BST is so simple. 
BT is just tree which can have only up to 2 children and BST is BT but we call one child as left
and the other as right.
Left is smaller than parent value and right is bigger than parent value.
Personally prefer using BST since the children are positioned left or right by there value compare to their parent, i can know relative value of each data.
Well, this post is about writing MY thought and impression about week 8.
And I do not know why people made “LLNode” and what is the point of using LLNode.
I only know people made it because they needed it. 
But so far, I DO NOT KNOW.