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
Summary of Key Concepts
A heap is a complete binary tree in which each element is greater than or equal to both of its children.
Adding an element to a heap can be accomplished by adding the element as a leaf, then moving it upward as appropriate.
Removing the maximum element from the heap can be accomplished by replacing the root with the last leaf, then moving it downward as appropriate.
A heap sort makes use of the primary characteristic of a heap to sort a set of elements.
A priority queue is not a FIFO queue. It orders elements according to priority,independent of the order in which they are added to the queue.
Problem and solution in teaching materials.
What is the difference between a heap and a binary search tree?
- A binary search tree and a heap are both binary trees that have constraints on the relationships among their elements. The nodes in a binary search tree are less than their left child and
- greater than or equal to their right child, whereas the nodes in a heap (maxheap) are greater than or equal to both children.
What is the difference between a minheap and a maxheap?
- A minheap keeps the smallest value in the tree at the root,whereas a maxheap keeps the largest value at the root.
- Otherwise, their strategies and implementations are similar.
How is the largest element removed from a heap?
- The maximum element is removed from a heap (maxheap) by replacing the root with the last leaf of the tree, then moving that
- element down the tree as appropriate to reassert the proper relationships among the elements.
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
- 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 Ninth Week的更多相关文章
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 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 ...
- 20182320《Program Design and Data Structures》Learning Summary Week9
20182320<Program Design and Data Structures>Learning Summary Week9 1.Summary of Textbook's Con ...
- 【Python学习笔记】Coursera课程《Python Data Structures》 密歇根大学 Charles Severance——Week6 Tuple课堂笔记
Coursera课程<Python Data Structures> 密歇根大学 Charles Severance Week6 Tuple 10 Tuples 10.1 Tuples A ...
随机推荐
- 【gulp】Gulp的安装和配置 及 系列插件
注意:要安装俩次gulp(全局和本地):全局安装gulp是为了执行gulp任务,本地安装gulp则是为了调用gulp插件的功能. 之前由大牛帮忙配置的gulp来用.今天时间充裕,就和小伙伴一起动手配置 ...
- undefined reference to `sqrt'的问题
主要问题是math.h这个头文件虽然在/lib/include 下有定义,但是该文件内并没有sqrt()的定义.解决的办法是:在编译的时候在后面加上-lm,意思是链接到math函数库. 在gcc下用到 ...
- block本质探寻四之copy
说明: <1>阅读本文,最好阅读之前的block文章加以理解: <2>本文内容:三种block类型的copy情况(MRC).是否深拷贝.错误copy: 一.MRC模式下,三种b ...
- 关于NSStringFromClass的一点见解
今天做项目的时候遇到一个需求,就是子view视图弹出时,屏蔽掉父view的所有手势,然后想到用 UIGestureRecognizerDelegate代理方法,中间省一些文字(无奈脸),言归正传,NS ...
- 【OC底层】KVC原理
定义 KVC的全称是Key-Value Coding,俗称“键值编码”,可以通过一个key来访问某个属性 常见的API有: - (void)setValue:(id)value forKeyPath: ...
- Linux入门基础(一):Linux基本操作
命令行BASH基本操作 Shell 用户不能直接操作内核,所以用户操作通过shell传递给内核 shell分为两种 : GUI 图形界面 (linux一般是GNOME) CLI 命令行界面 (linu ...
- SpringBoot与mongodb的结合
本文系列文章: 使用Shell 操作 MongoDB的技巧 MongoTemplate的使用技巧及其注意事项 敬请期待. 前言 最近公司想要做一个用户行为数据的收集,最开始想用mysql来存储 ...
- Firebird3基本使用
解决C#无法访问的情况:1. 使用FirebirdSql.Data.FirebirdClient 5版本以上.2.修改Firebird.conf配置文件WireCrypt为Enabled#WireCr ...
- JavaWeb基础—JSP
一.什么是JSP JSP 全称是 Java Server Pages,是一种开发动态web资源的技术 在原HTML上添加JAVA脚本(灵魂工程师,为页面添加灵魂),可以说 jsp = html + j ...
- [原]Asp.net Core 2.1.2 测试成功Ajax上传文件新解法
利用layui框架可以上传文件调试拦截成功! [HttpPost] public IActionResult Method1(IFormFile file) { return Json(new{suc ...


