2015年3月18日星期三

slogs for week 7: Recursion and object-oriented programming and abstract data structures

Last week, we learned binary tree and binary search tree. Same with week 6, I still cannot finish lab questions,but the good news is my recursion coding skills has improved distinctively. As a result, I am able to use recursion to solve one of the functions in assignment 2 called "current_score".

When I am doing the assignment 2, I get a much deeper understanding of object-oriented programming. In fact, before this assignment, even though professor said a lot about what "object-oriented" is, I still could not grasp the key to this concept. However, after doing this assignment and discussing with fellow students, I could finally be able to simplify this concept. Python and Java is object-oriented languages. When using these two languages, we usually write class such as: class tree, class stack and etc. Especially for Java, we could only write class by using java while python could also accept independent blocks of functions.

CSC148 has introduced multiple simple abstract data structures so far. Tree, binary tree, binary search tree and etc. I especially want to talk about the binary tree in details. Binary tree is a recursive structure, which has a left tree and right tree. Tree-list and class are two effective ways to represent tree structure.



Reference: http://bit.ly/1MLcaEu 

没有评论:

发表评论