Thursday, April 2, 2015

Week12 slog

This is the last week of the term. Look back to my term, I think I really did a good job in this lesson, surprisingly.(because I thought I will never pass the exam) And also realize that I still need to pay much more attention to computer science because this is just like a whole, mystery word for me.

Week11 slog

In the previous week, I learnt a lot of new concepts. The hardest one is always about recursion. In a3, we are asked to use recursion to write functions, however, I stuck on those functions for a long time. I think this is because of my insufficient understanding about recursion. I must review the relevant material more.

Week10 slog

In week 9, we learnt to write unittest and also the way of writing minimax strategy.
In a2, I stuck on minimax for a long time because I haven't understand it clearly.

Week9 slog

In week8, we had a kind of revision in Bst. Here is a new function.
def insert(node, data):
’’’ (BTNode, object) -> BTNode
Insert data starting at node, and return root.
’’’
return_node = node
if not node:
return_node = BTNode(data)
elif data < node.data:
node.left = insert(node.left, data)
elif data > node.data:
node.right = insert(node.right, data)
else: # nothing to do
pass
return return_node
In fact, this function took me a lot of time to understand.

Week8 slog

This week, we learnt a quite interesting ting called linked list. In this list, except the back one, everything in the list is pointing the next one and it is also able to delete one thing in the list, just by making the front thing's next equal to the thing's next.