From this week, we encounter a lot about class binary trees. Recursion is well used for this class. I learned that there are three kind of order for binary tree: pre-order, post-order and in-order. In-order looks at left first then centre then right. Pre-order looks at centre first then left and right. Post-order looks at left and right first then centre. But I still wonders what are the benefits for these three methods seperately. I need to take more time on weekends on the lab materials.
没有评论:
发表评论