20172306 2018-2019 "Java Programming and data structure" first week study summary

Source: Internet
Author: User

20172306 2018-2019 Java Programming and data structure (part One) Summary of learning contents in the first week of learning Summary The first chapter overview

(Program = data structure + algorithm software = program + Software engineering)

    • 1.1 Software Quality
      • Software engineer a discipline on technology and theory of high-quality software development
      • The goal of software engineering: 1. Solve the correctness problem 2. Provide solutions on time and within budget 3. Provide a high-quality solution 4. Complete the above things in a reasonable way.
      • Features of high-quality software
    • Correctness: I think what we do is to solve a problem of correctness.
    • Reliability: Reduce the degree and probability of software failure
    • Robustness: Can be a good solution to the situation where the exception occurs
    • Availability: Ensure that the software is well-used
    • Maintainability: For software, is a long-term use and improvement process, therefore, a good software needs to be maintainable, sustainable maintenance and development
    • Reusability: I think the creation of software can be used in another software, improve efficiency and improve utilization
    • Portability: A software that can be used in many different environments
    • Operating efficiency: A good software operating efficiency is also one of the conditions.

    • 1.2 Data structures
      • The purpose of software development is to build software, not just write code.
      • Stacks can be used to reverse the order of datasets, and queues can maintain the order of their data
    • Self-Test questions
      • Reliability is concerned with the frequency and environment of failure, and robustness concerns what happens when a failure occurs.
      • Well-structured, well-designed software with good documentation for easier maintenance
Chapter Two algorithm analysis

(Algorithmic analysis is the basis of computer science)

  • 2.1 Algorithm Efficiency analysis
    • The efficiency of the algorithm used to accomplish a particular task is a major factor in determining how fast a program is running.
  • 2.2 Enlargement function and large O notation
    • The growth function represents the time complexity or spatial complexity of the algorithm.
    • We mainly discuss the asymptotic complexity of the algorithm, which is called the Order of the algorithm (ignoring constants and other minor items in the growth function of the algorithm, only the main items are retained).
    • The order of the algorithm provides an upper bound for the growth function
    • All algorithms with the same order are considered equivalent in terms of operational efficiency
  • 2.3 Comparison of growth functions
    • Finding a more efficient algorithm is a better solution than using a faster processor
    • Comparison of growth functions

  • 2.4 Time complexity analysis
    • 1. Cyclic operation complexity
    • (1) The complex of the circulating body is O (1), it needs to loop n times, then the time complexity is O (n).
    for(int count = 0;count<n;count++)  {  //*复杂度为O(1)的步骤系列    }
    • (2) In fact, I think this situation, generally I will try to calculate, although slow, but can better understand. The time complexity is O (logn).
    count = 1; while(count < n) { count *=2; //复杂度为O(1)的步骤系列 }
    • 2. Nesting of loop complexity
    • The inner and outer layers are considered when the complexity of the loop body needs to be considered. The complexity is O (N2).
    • for(int count = 0;count < n;count++){for(int count2 = 0;count2<n;count2++) {     //复杂度为O(1)的步骤系列 }}
    • 3. Method call Complexity

    • To sum up is: we may refer to a method in the loop body, the complexity of the method is uncertain, but the same purpose, its complexity is likely to be different, so specifically, or according to the complexity of the method body.

  • Self-Test questions
    • As the problem increases, the complexity of the algorithm will continue to approach the progressive complexity
    • With the increase of the complexity of the algorithm, the effect of the increase of processor on the complexity is less and less.
Textbook Layout Questions answered
    • EX2.1 What is the order of the following growth functions?
    • a.10n^2+100n+1000
      Solution: The order is the gradual complexity, for the three items, the first is the fastest growth, the master is n^2, so the order is n^2.
    • B.10n^3-7
      Solution: 10n^3 is the fastest growing, so the order is n^3
    • C. 2^n+100n^3
      Solution: In terms of these two, we can see the previous growth function comparison, we can find that n^3 growth rate is fast, so the order is n^3.
    • D. N^2logn
      Solution: Order is n^2logn.

    • EX2.4 Please determine the growth function and order of the following code snippet
for(int count = 0 ; count < n ; count++)    for(int count2 = 0 ; count2 < n ; count2 = count2 + 2)        {            System.out.println(count,count2);        }}

Solution: Growth function is N^2/2; order is n^2. Because the first look inside, you will find that the inner loop to carry out N/2 times, the outer loop to do n times, according to the previous study, will be multiplied inside and outside, then N^2/2.

    • EX2.5 Please determine the growth function and order of the following code snippet
for(int count = 0 ; count < n ; count++)    for(int count2 = 0 ; count2 < n ; count2 = count2 * 2)        {            System.out.println(count,count2);        }}

Solution: The growth function is NLOGN and the order is Nlogn. Because, can be listed first, you will find that the inner layer of the number of loops is LOGN, the outer layer is n times, and internal and external multiplication of nlogn.

Pair and peer review templates:
    • Blogs that are worth learning or questions:
      • Xxx
      • Xxx
reviewed the classmates blog and code
    • This week's study of the knot
      • 20172325
      • Pairs of learning content
        • Read the contents of the 12th chapter together
        • The exercises that were arranged after the class were completed together
Other (sentiment, thinking, etc., optional)
 新学期开始了,又要和Java这门课斗智斗勇了!上学期这门课学的不咋地,这学期不知道能够学成什么样。假期说起博客的事情,我说我不爱写博客,我爸说,你都看书了为什么你就不好好把博客写的好点呢?我一想,有点道理,所以呢,刚开学,还是要对自己有信心的,争取这学期能保持好好写博客,学好这门课!!!
Learning progress Bar
lines of code (new/cumulative) Blog Volume (Add/accumulate) Learning Time (new/cumulative) Important Growth
Goal 5000 rows 30 Articles 400 hours
First week 0/0 1/1 6/6
Resources
    • Java architecture design and data Structure (fourth edition)

20172306 2018-2019 "Java Programming and data structure" first week study summary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.