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. zabbix 从入门到精通

    https://www.cnblogs.com/clsn/p/7885990.html

  2. zabbix 主动模式和被动模式配置文件对比

    1.主动模式: 在web上看zabbix available 是红色 [root@python ~]# egrep -v '^#|^$' /etc/zabbix/zabbix_agentd.conf ...

  3. koa2实现简单的图片上传

    1.安装koa-body 2.引入koa-body const koa = require('koa'); const fs = require('fs'); const koaBody = requ ...

  4. 关于mysql-mybatis批量添加

    mybatis怎么实现一次插入多条数据   以后从新浪博客转到博客园这边来记录把.   这篇地址:http://blog.sina.com.cn/s/blog_13e9702640102ysho.ht ...

  5. C语言学习记录_2019.02.05

    switch只能判断整数,而分段函数的判别是一个范围,我们无法用整数来表示范围 跟踪语句的方法: (1)debug调试 (2)printf( )语句跟踪 小套路:当循环次数很大时,可以先模拟较小次数的 ...

  6. Scala(三):类

    类:Class 1.简单类和无参方法 2.带getter和setter属性 3.只带getter属性 4.对象私有字段 5.Bean属性 6.辅助构造器 7.主构造器 8.嵌套类 1.简单类和无参方法 ...

  7. BZOJ1068_压缩_KEY

    题目传送门 区间DP,设f[i][j][0/1]为i~j区间的压缩情况,1表示在插入了一个M. code: /********************************************* ...

  8. 【转载】COM小结

    原文:http://blog.csdn.net/byxdaz/article/details/6595210 一.Com概念 所谓COM(Componet Object Model,组件对象模型),是 ...

  9. P3707 [SDOI2017]相关分析

    P3707 [SDOI2017]相关分析 线段树裸题?但是真的很麻烦QAQ 题目给的式子是什么不用管,大力拆开,就是\(\frac{\sum x_iy_i-\overline xy_i-\overli ...

  10. idea 误删out目录中的文件导致开启服务器后无法访问页面的问题

    只需要把out目录整个删除掉,然后再重新开启服务器,服务器就会自动生成新的out目录 同理,target目录也是整个删除掉就能重新生成