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)?

  • 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?

  • 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?

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

Code hosting

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
target 5000lines 30articles 400hours
First week 180/180 1/1 20/20
Second week 1049/1229 1/2 18/38
Third week 1037/2266 3/7 22/60
Fourth week 1120/3386 2/9 30/90

20162314 《Program Design & Data Structures》Learning Summary Of The Eighth Week的更多相关文章

  1. 20162314 《Program Design & Data Structures》Learning Summary Of The Ninth Week

    20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The Ninth Week ...

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

    20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The Seventh Wee ...

  3. 20162314 《Program Design & Data Structures》Learning Summary Of The Fifth Week

    20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The Fifth Week ...

  4. 20162314 《Program Design & Data Structures》Learning Summary Of The Second Week

    20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The Second Week ...

  5. 20162314 《Program Design & Data Structures》Learning Summary Of The First Week

    20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The First Week ...

  6. 20162314 《Program Design & Data Structures》Learning Summary Of The Eleventh Week

    20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The Eleventh We ...

  7. 20162314 《Program Design & Data Structures》Learning Summary Of The Tenth Week

    20162314 2017-2018-1 <Program Design & Data Structures>Learning Summary Of The Tenth Week ...

  8. 20182320《Program Design and Data Structures》Learning Summary Week9

    20182320<Program Design and Data Structures>Learning Summary Week9 1.Summary of Textbook's Con ...

  9. 【Python学习笔记】Coursera课程《Python Data Structures》 密歇根大学 Charles Severance——Week6 Tuple课堂笔记

    Coursera课程<Python Data Structures> 密歇根大学 Charles Severance Week6 Tuple 10 Tuples 10.1 Tuples A ...

随机推荐

  1. 开源的PaaS方案:在OpenStack上部署CloudFoundry (三)部署BOSH

    BOSH是CloudFoundry提供的用来安装部署和升级CloudFoundry的自动化工具,可是说是CloudFoundry的一部分.总体来说,BOSH是Client/Server结构, BOSH ...

  2. 转移wordpress到另一台主机

    做项目的代码是两个人,我想把另一个小伙伴做的转移到自己的linux系统上(主要是linux下一片空白,从头做太浪费时间了) 这个过程其实也可以用来类比从本地到服务器的过程(可能略有不同,真上线的时候会 ...

  3. iconfont阿里爸爸做的开源图库

    iconfont 三种使用姿势 1.unicode格式 优点 兼容性最好,支持ie6+ 支持按字体的方式去动态调整图标大小,颜色等等 缺点 不支持多色图标 在不同的设备浏览器字体的渲染会略有差别,在不 ...

  4. 真机远程页面调试工具spy-debugger 3.x:集成weinre+AnyProxy,页面调试+抓包。调试生产HTTPS页面。

    .页面调试+抓包 2.操作简单 3.支持HTTPS. 4.spy-debugger内部集成了weinre.node-mitmproxy.AnyProxy. 5.自动忽略原生App发起的https请求, ...

  5. 大规模网站sesson会话保持思路及实践配置

    1.需求: 请教个问题:我用lvs的rr模式,(考虑过 ipvsadm -p,但是这样就失去了负载均衡的意义感觉),后端有10台web,用一台memcached专门用于存储session文件,但是现在 ...

  6. ionic开发过程中遇到的一些坑!

    总结一些:在使用 ionic 开发过程中所遇到的问题. 问题一:Cannot find module '@ionic/app-scripts' 描述:使用 ionic start 项目的时候,项目安装 ...

  7. 神奇的随机数rand()

    随机数在统计理论中占有很重要的地位,很多应用都需要用到他,系统自带的rand()函数产生的是伪随机数,所以该如何真正的随机数呢? 1.c语言中的时间函数 关于c语言我查到的两个比较好的博文是:http ...

  8. C++ 引用的辨别

    对于习惯使用C进行开发的朋友们,在看到c++中出现的&符号,可能会犯迷糊,因为在C语言中这个符号表示了取地址符,但是在C++中它却有着不同的用途,掌握C++的&符号,是提高代码执行效率 ...

  9. linux dd命令详解及使用案例场景

    一.dd命令 dd:用指定大小的块拷贝一个文件,并在拷贝的同时进行指定的转换. 注意:指定数字的地方若以下列字符结尾,则乘以相应的数字:b=512:c=1:k=1024:w=2 参数注释: 1. if ...

  10. Rain on your Parade---hdu2389(HK求最大匹配)

    题目链接 题意:有n个客人,m把雨伞,在t秒之后将会下雨,给出每个客人的坐标和每秒行走的距离,以及雨伞的位置,问t秒后最多有几个客人可以拿到雨伞? 就是求最大匹配的  Hopcroft-Karp复杂度 ...