zoukankan      html  css  js  c++  java
  • 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

    • 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
  • 相关阅读:
    删除文件用哪个命令?如果需要连目录及目录下文件一块删除呢?删除空文件夹用什么命令?
    Ls 命令执行什么功能?可以带哪些参数,有什么区别?
    绝对路径用什么符号表示?当前目录、上层目录用什么表示?主目录用什么表示? 切换目录用什么命令?
    查看文件内容有哪些命令可以使用?
    把后台任务调到前台执行使用什么命令?把停下的后台任务在后台执行起来用什么命令?
    终止进程用什么命令? 带什么参数?
    查看各类环境变量用什么命令?
    怎么使一个命令在后台运行?
    Grep 命令有什么用?如何忽略大小写?如何查找不含该串的行?
    Linux 中进程有哪几种状态?在 ps 显示出来的信息中,分别用什么符号表示的?
  • 原文地址:https://www.cnblogs.com/CS162314/p/7568198.html
Copyright © 2011-2022 走看看