20162314 《Program Design & Data Structures》Learning Summary Of The Seventh Week

20162314 2017-2018-1 《Program Design & Data Structures》Learning Summary Of The Seventh Week

Summary of Key Concepts

  • A tree is a nonlinear structure whose elements are organized into a hierarchy.

  • The order of a tree specifies the maximum number of children any node in the tree may have.

  • A balanced n-ary tree with m elements will have height log n m.

  • There are four basic techniques for traversing a tree.

  • A queue can be used to store the elements of a tree during a level-order traversal.

  • One strategy for implementing binary trees using arrays places the left child of element n at position (2 n * 1) and the right child at position (2*(n + 1)).

  • A stored link strategy for an array-based tree implementation allows array positions to be allocated contiguously regardless of the completeness of the tree.

  • How elements are added to and removed from a general binary tree depends on the tree’s purpose.

  • A decision tree can be used as the basis for an expert system.

Problem and solution in teaching materials.

Compare and contrast preorder and postorder tree traversals.?

1062769-20171022232703724-1949861235.png
Tree traversals visit each element in the tree. The type of traversal dictates when a node is visited. A preorder traversal visits the root before visiting either subtree, and a postorder traversal visits the root after visiting both subtrees.

1062769-20171022233411037-416001536.png
The computed link strategy does not have to store the links between a parent to child node since that relationship is determined by its position in the array. However, this strategy may
lead to substantial wasted space for trees that are not balanced and/or not complete.

What is a decision tree?

1062769-20171022233618802-1874292614.png
A decision tree is a tree used to represent the questions and responses that can be used to determine an appropriate conclusion. A decision tree can be used as the basis of an expert system, such as a medical diagnosis system.

What is a binary tree?

It would take two dummy records in a doubly linked list, one at the front and one at the rear, to eliminate the special cases when dealing with the first and last node.
A binary tree is a tree whose nodes can have no more than two children. Binary trees are quite useful in many problem-solving situations.

Code hosting

1062769-20171022234121834-1415959686.png

Summary of error for last week.

Linear search is always more effective than binary search.The answer should be false, for the situation of "n = 2".

Evaluate for my partner

  • Advantage and problem in the blog:
    • Concise and comprehensie
    • Uncleary to the content
    • Mould is amazing
  • Advantage and problem in the code:
    • Serious writing.
    • Wonderful idea
    • Too less

Learning situation of partner

  • 20162310

  • Learning content of partner:
    • Algorithm
    • Recursion
    • HanoiTowers and maze

Anything else that want to say

  • It's not easy to persere on utizing English to write a blog.But I'm getting used to doing this because of the benefit.

Academic progress check

Code line number(increasing/accumulative)Blog number(inc/acc)studying time(inc/acc)progress
target5000lines30articles400hours
First week180/1801/120/20
Second week1049/12291/218/38
Third week1037/22663/722/60
Fourth week1120/33862/930/90

转载于:https://www.cnblogs.com/CS162314/p/7712651.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值