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

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

Summary of Key Concepts

  • A binary search tree is a binary tree in which, for each node, the elements in the left subtree are less than the parent, and the elements in the right subtree are greater than or equal to the parent.

  • The most efficient binary search trees are balanced, so that half of the viable candidates are eliminated with each comparison.

  • Without any additional processing, the shape of a binary search tree is dictated by the order in which elements are added to it.

  • There are three situations to consider when removing an element from a binary search tree, two of which are straightforward.

  • When removing a node with two children from a binary search tree, the inorder successor is a good choice to replace it.

  • Rotations can be performed on a binary search tree to help rebalance them.

Problem and solution in teaching materials.

Why is it important for a binary search tree to be balanced(or close to balanced)?

1062769-20171029202649086-1114214242.png

  • If a binary search tree is balanced, approximately half of the elements are eliminated from consideration with each comparison.
  • The more unbalanced the tree, the closer it gets to a linear structure, which is much less efficient.

What is the most interesting situation when removing an element from a binary search tree?

1062769-20171029202939945-1770417738.png

  • The most interesting situation when removing an element from a binary search tree occurs when the element has two children,
  • because there is no simple option to replace the element (as there are if it has one child or no children).

What is a binary search tree rotation?

1062769-20171029203236789-194335761.png

  • A binary search tree rotation is an operation that helps put a binary search tree back into a balanced state.

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/7751069.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
《C语言数据结构基础》是一本介绍数据结构基本概念和C语言实现的书籍。数据结构是计算机存储、组织和管理数据的方式,它是计算机科学的重要基础。本书首先介绍了各种常见的数据结构,如数组、链表、栈、队列、树、图等,在介绍这些数据结构的同时详细讨论了它们的特性、操作和应用场景。 书中提供了许多C语言的代码实现,让读者可以通过实际的编程案例加深对数据结构的理解。其中涉及了各种数据结构的基本操作,如插入、删除、查找、排序等。通过编写这些代码,读者不仅可以加深对数据结构的理论和实现方法的理解,还可以提升其编程能力和解决问题的能力。 《C语言数据结构基础》还特别强调了程序的性能问题。在介绍各种数据结构的同时,作者给出了它们的时间复杂度和空间复杂度分析。这样,读者可以根据具体需求选择最合适的数据结构,以提高程序的执行效率和资源利用率。 此外,本书还介绍了一些常用的算法和技巧,如递归、动态内存管理、哈希表等。这些内容为读者提供了更多解决实际问题的工具和思路。 总而言之,《C语言数据结构基础》通过理论介绍、编程实践和综合案例的方式,全面而深入地讲解了数据结构在C语言中的基本概念和应用。对于计算机科学和软件工程领域的学生和从业者来说,这本书是一本不可或缺的参考资料,可以帮助他们建立起坚实的数据结构基础。

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值