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 ...
随机推荐
- shadowssock+openvpn 2.2.2 成功*** -- 好文档 - 原理理解+架构
[root@iZrj9j4lxhjopzii4vhw0lZ 2.0]# grep -v '^#' vars |grep -v '^$'export EASY_RSA="`pwd`" ...
- CanOpen协议【CanFestival】移植方法 支持VC、QT、STM32
前段时间学习了CanOpen协议,到网上下载的CanFestival3-10源码,移植到VC.QT.STM32等平台,由于网上的资源较少,走了不少弯路,移植好使用过程中才逐渐暴露出各种问题,比如OD字 ...
- SharePoint document 右键菜单和【...】菜单不一致的解决办法
[问题]在sharepoint 2016环境中,当用户只有read权限,访问文档库,会发现文档的右键菜单和[…]菜单的内如是不一致的,而更高权限用户都是一致的. [分析]这个跟微软询问过,是个bug, ...
- js call().apply().bind()的用法
function Person(age) { this.age = age; } Person.prototype.sayHi = function (x, y) { console.log((x + ...
- MySQL基础----py全栈
目录 MySQL基础----py全栈 一.引言 1.什么是数据? 2.什么是数据库(DB)? 3.什么是数据库管理系统(DBMS)? 4.什么是数据库系统? 5.数据库管理系统由来 6.什么是数据模型 ...
- 笔记1:MYSQL
(注:第一次写,如有错误之处,希望指出,不胜感激,谢谢,不喜也勿喷) 一.MYSQL简单描述 1.MYSQL是什么? MYSQL是现在最流行的关系型数据库管理系统之一: MYSQL是开源软件: 关系型 ...
- nginx负载均衡及配置
nginx负载均衡及配置 1 负载均衡概述 负载均衡由来是因为当一台服务器单位时间内的访问量很大时,此时服务器的压力也会很大,当超过自身承受能力时,服务器就会崩溃.为避免让服务器崩溃,用户拥有更好的体 ...
- 利用js编写一个简单的html表单验证,验证通过时提交数据(附源码)
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8 ...
- Json转Scala对象一个问题
今天与第三方对接一个接口,由于我们是用Scala语言,对方的返回体Json需要转换为一个对象,对象里面包含一个数组也可以说是集合,于是乎就用List接收,看似没问题,编译也没报错,自测调用的时候就报了 ...
- springmvc ajax传递json值时出现400错误 (问题出在sql上)
问题出在sql的int不能达到 10000000000 这个值,从 int(11) 修改成 varchar(20) 就可以正常存储了


