This week, we learned binary tree and binary search tree, two trees are very similar, also very "different". They all have two children maximum, but in binary search tree, the value of left child must smaller than parent,and value of right child must bigger than parent. In binary tree,we do not care this. Also ,I was confused about preorder, inorder, and postorder, then I found some pattern, it help me to remember these three order.Also, in binary tree, we still use a lot of recursion. I also understand that binary search tree can be used to save informations, anyway, we have not learn this yet.
没有评论:
发表评论