Tags: Problem method porting Ali needs to progress ble important
20172328 20182019 "Java software architecture and data structure" the first week of learning summary overview
GeneralizationThis week, we learned about software quality, data structure, and algorithmic analysis, mainly based on the first and second chapters of the textbooks used. Summary of learning contents of textbook
A Summary of textbook
 Chapter One: Overview
 1.1 Software Quality
 Software Engineering: A discipline of technology and theory on highquality software development.
 The goal of software engineering: Solving correctness problems, giving solutions on time and within budget, giving highquality solutions, and accomplishing things in a reasonable manner.
Features of highquality software
 Important Interpretation:

Reliability: Reliable software rarely fails, and even if a failure occurs, the impact of the failure can be minimized.

About maintainability: Software systems must be carefully designed, coded, and documented to support the work of developers, maintainers, and users.

About portability: Java's source code is compiled into bytecode, which is a lowlevel language and is not a machine language for any particular CPU. The bytecode runs on the Java Virtual (JVM). The JVM is a software that interprets and executes bytecode.

For operational efficiency: software must efficiently use resources such as CPU time and storage .
 1.2 Data structures
 Data structure: The form of computer storage and organization.
 program = data structure + algorithm
 Software = Program Plus software engineering
 The Java Toolkit provides a powerful data structure. Common data structures are arrays, stacks, queues, linked lists (Linked list), Trees (tree), hash tables (hash), hash tables, and so on.
 The stack reverses the structure of the data set, and the queue maintains the structure of the dataset.
Common data structures that can be used to queue a sequence set are sequential tables, heaps, and hash lists.
 Chapter Two: Algorithm analysis
 2.1 Algorithm Efficiency analysis
 Algorithm Analysis: The main focus of computer science on the efficiency of software algorithms. Algorithmic analysis is the basis of computer science.
 2.2 Growth function and Big O notation
 Growth function: Represents the amount of time or space that corresponds to the size of the problem, representing the relationship between the size of the problem (n) and the value we want to optimize. This function represents the event complexity or spatial complexity of the algorithm.
 Progressive complexity: called the order of the algorithm. As the example in the book, the second dish washing algorithm has the time complexity of order n^2, which is recorded as O (n^2), this notation is called O () or large O notation. The order of the algorithm is the constant and other minor items in the growth function that ignore the algorithm, and only the main items are retained .
 Some growth functions and their progressive complexity [image display]
 Thus, the order of the algorithm provides an upper bound for the growth function.
2.3 Comparison of growth functions
 Callout: √10≈3.162277660168379, 3√10≈2.1544, log? (=LG)/LG (2) =1/lg (2) = 3.321928, judging from the last set of data, the problem is not to speed up the CPU ( because the speed of the processor after the help is small poor ), but to simplify the problem on the algorithm, greatly improve the speed of the program run.
 Comparison Chart of growth function
 2.4 Time complexity analysis
 Analysis of complexity of 2.4.1 cycle operation
 To analyze the order of an algorithm, it is often necessary to determine the number of times a particular statement and a set of statements run. To analyze a loop run, first determine the order n of the loop body, and then multiply it by the number of times that the loop runs. Remember, n is the size of the problem.
 Even though the loop sometimes skips several numbers, the growth function changes, but the constant does not affect the asymptotic complexity, so the order is unchanged.
 Analysis of complexity of nested loops in 2.4.2
 When parsing nested loops, both the memory loop and the outer loop are taken into account, and the complexity is calculated using multiplication.
The complexity of the method invocation is related to the complexity of the loop body.
Problems in teaching materials learning and the solving process
Problem and countermeasure
Afterschool exercises answer
Exercise
 EX 2.1: What is the order of the following growth functions?
 a.10n^2+100n+1000
 Answer: Order is: n^2.
 B.10n^37
 Answer: Order: n^3
 C.2^n+100n^3
 Answer: Order: n^3
 D.n^2 log (N)
 Answer: Order: n^2 log (n)
 EX 2.4: Please determine the growth function and order of the code snippet below
for(int count = 0 ; count < n ; count++) for(int count2 = 0 ; count2 < n ; count2 = count2 + 2) { System.out.println(count,count2); }}
 Answer: The number of times required by the internal loop is N/2, the number of times the outer loop needs to be performed is n, so the growth function is f (n) = (n^2)/2, order is n^2
 EX 2.5: Please determine the growth function and order of the code snippet below
for(int count = 0 ; count < n ; count++) for(int count2 = 1 ; count2 < n ; count2 = count2 * 2) { System.out.println(count,count2); }}
 Answer: The number of times the internal loop is log? (n1), the number of times the outer loop needs to be performed is n, so the growth function is f (n) =n log? (n1), and because the order is related to the highest order of the growth function, the order is n log2 (n) to omit the secondary and constant entries.
Pairing and mutual evaluation
Group Estimate
20172301
20172304
Reviews Template:
 Blogs that are worth learning or questions:
Other (sentiment, thinking, etc., optional)
Else
Do not listen to the sound of the forest dozen leaves, why not chant and Xu line.
Learning progress Bar
Learning List

lines of code (new/cumulative) 
Blog Volume (Add/accumulate) 
Learning Time (new/cumulative) 
Goal 
5000 rows 
30 Articles 
400 hours 
First week 
0/0 
1/1 
8/8 
Resources
Reference
 [Java software architecture and data Structure] (fourth edition)
 Types of Java Data structures
20172328 20182019 "Java software architecture and data Fundamentals" First week study summary