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

  • 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 Ninth Week的更多相关文章

  1. 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 ...

  2. 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 ...

  3. 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 ...

  4. 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 ...

  5. 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 ...

  6. 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 ...

  7. 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 ...

  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. 公司架构理解 - 千万 pv 网站

    1.面试题 - 花架构图 commander 控制台,请求处理器 crp 资源分配器 相当于仓管 .推荐系统的架构流程图和每一个模块的作用一定要了解,一般会让你一边画流程图一边讲解每个模块. 2.我自 ...

  2. Java静态方法块、非静态方法块、构造方法、静态方法执行顺序

    示范类StaticTest.java public class StaticTest {     {//只有当创建对象的时候执行         System.out.println("H1 ...

  3. Gym100920J

    求Ax+By<=C,非负整数对(x,y)的个数 首先令y=0;则x<=(C/A);ans=(C/A)+1; 将Ax+By=C反转之后利用类欧几里得算法:f(a,b,c,n)=∑((a*i+ ...

  4. [示例] Firemonkey ListView 仿 iPhone X 浏海

    Apple iPhone X 推出后,全屏上多了一个浏海,虽然褒贬不一,也有 Xcode 开发者做出了不错的 ListView 效果,当然 Delphi 也不落人後,马上试做看看. 源码下载:[示例] ...

  5. kali linux修改更新源及更新

    1.修改sources.list源文件: leafpad /etc/apt/sources.list #aliyun 阿里云 deb http://mirrors.aliyun.com/kali ka ...

  6. 筑基期—C语言

    1.1 环境: 在ANSIC的任何一种是实现中,存在两种不同的环境.第一种是翻译环境,第二种是执行环境.标准明确说明这两种环境不必在同一台机器上,交叉编译器就是在一台机器上运行,但它所产生的可执行代码 ...

  7. 如何使用cubemx 配置freertos,实时查看FreeRTOS任务列表和运行状态

    ---------------------------------------------------------------------------------------------------- ...

  8. json keyname map

    var obj = { fname:'zhao', lname:'yao', parents:{ father:'zhao' }, children:[ { dname:'zhaoyiyi' } ] ...

  9. 20155222 c语言实现pwd命令

    20155222 c语言实现linux的pwd命令 1.学习pwd命令在Linux层次结构中,用户可以在被授权的任意目录下利用mkdir命令创建新目录,也可以利用cd命令从一个目录转换到另一个目录.然 ...

  10. Gitlab+Jenkins学习之路(八)之发布maven项目及按版本发布

    一.什么是Maven maven是一个项目管理和综合工具.Maven提供给开发人员构建一个完整的生命周期框架. 开发团队可以自动完成该项目的基础设施建设,Maven使用标准的目录结构和默认构建生命周期 ...