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 ...
随机推荐
- jQuery带缩略图轮播效果图片切换带缩略图
以上为效果图 HTML代码: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /& ...
- 如何防止网页被植入广告,内容被监控-HTTPS
前几天一朋友说访问网站页面底部怎么出现小广告了呢,内容有点不雅,朋友截图发给我,调侃我说怎么放这种广告,我一听纳闷,网站运行伊始,从来没有投放过任何广告,更别说不雅广告了. 最近还遇到一个问题就是,网 ...
- R语言爬虫:使用R语言爬取豆瓣电影数据
豆瓣排名前25电影及评价爬取 url <-'http://movie.douban.com/top250?format=text' # 获取网页原代码,以行的形式存放在web 变量中 web & ...
- Verilog_Day2
Verilog_Day1 在CSDN博客上.http://blog.csdn.net/m0_38073085 第三章: 书上基本知识 每个Verilog程序包括4个主要部分:端口定义,I/O说明,内部 ...
- 20155211 课下测试ch11补做
20155211 课下测试ch11补做 Web服务器的实现基于HTTP协议,有关HTTP协议,下面说法正确的是() A.可以用telnet充当Web服务器的客户端进行调试 B.HTTP请求的GET和P ...
- 20155236范晨歌_MSF基础应用
20155236范晨歌_MSF基础应用 20155236范晨歌_MSF基础应用 目录 概述 MS08-067漏洞攻击 MS11-050漏洞攻击 MS10-087漏洞攻击 辅助模块 概述 MSF的六种模 ...
- 20155307刘浩《网络对抗》逆向及Bof基础
20155307刘浩<网络对抗>逆向及Bof基础 实践目标 本次实践的对象是一个名为pwn1的linux可执行文件.该程序正常执行流程是:main调用foo函数,foo函数会回显任何用户输 ...
- 【LG3250】[HNOI2016]网络
[LG3250][HNOI2016]网络 题面 洛谷 题解 30pts 对于\(m\leq 2000\),直接判断一下这个个点是否断掉一个交互,没断掉的里面取\(max\)即可,复杂度\(O(m^2\ ...
- opencv-Getting Started with Images
1.opencv库简单的操作图片 # coding = utf-8 # 书籍:<<学习opencv>> import cv2 from matplotlib import py ...
- Kafka系列二 kafka相关问题理解
1.kafka是什么 类JMS消息队列,结合JMS中的两种模式,可以有多个消费者主动拉取数据,在JMS中只有点对点模式才有消费者主动拉取数据. kafka是一个生产-消费模型. producer:生产 ...