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
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
- 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的更多相关文章
- 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 ...
- 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 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 ...
随机推荐
- start_kernel之前的汇编代码分析
start_kernel之前的汇编代码分析 Boot中执行下面两句话之后,进入uclinux内核. theKernel = (void (*)(int, int, unsigned int))((ui ...
- Oracle ora-12514监听程序当前无法识别连接描述中请求的错误
昨天刚安装好oracle数据库,还可以登录,到今天,登录时就发出了这样的错误 到网上找了半天,上面都是说监听器服务的问题,但是试过后依旧不行.最后重启了一次,就解决了异常 原来是oracle中一个服务 ...
- iOS开发网络篇—发送GET和POST请求(使用NSURLSession) - 转
说明: 1.该文主要介绍如何使用NSURLSession来发送GET请求和POST请求 2.本文将不再讲解NSURLConnection的使用,如有需要了解NSURLConnection如何发送请求. ...
- 【js】走近小程序(2) 常见问题总结
一.API请求? 二.基础库兼容? 三.不同页面之间的传值 一.API请求? wx.request({ url: 'test.php', // 仅为示例,并非真实的接口地址 data: { x: ...
- docker 简要学习
一.Docker的安装和启动 使用环境centos7 yum包更新到最新 sudo yum update 安装需要的软件包,yum-util提供yum-config-manager功能 sudo yu ...
- 成为linux的合格公民
前言: 该片文章献给申请linux国籍的所有瘾君子们: 还记得17年的勒索病毒感染了无数的window操作系统. 在windows上待久的公民会渴望有无另一个世界,简单的图形化操作使得一切都变的 ...
- 【转】JavaScript操作SVG的一些知识
原文:http://blog.iderzheng.com/something-about-svg-with-javascript/ 前阵子学习了一下SVG(Scalable Vector Graphi ...
- 谷歌大脑科学家 Caffe缔造者 贾扬清 微信讲座完整版
谷歌大脑科学家 Caffe缔造者 贾扬清 微信讲座完整版 一.讲座正文: 大家好!我是贾扬清237,目前在Google Brain83,今天有幸受雷鸣师兄邀请来和大家聊聊Caffe60.没有太多准备, ...
- 一维码UPC E简介及其解码实现(zxing-cpp)
UPC(Universal Product Code)码是最早大规模应用的条码,其特性是一种长度固定.连续性的条 码,目前主要在美国和加拿大使用,由于其应用范围广泛,故又被称万用条码. UPC码仅可 ...
- rabbitMQ的三种路由模式
rabbitMQ工作流程: 1.声明交换机 2.声明消息队列 3.绑定交换机和队列 4.生产者往交换机里发送新消息 5.交换机根据所选的模式和routingKey决定消息发往哪条消息队列 6.一个消费 ...