# Second software engineering jobs

Blog information Shenyang Aerospace University School of Computer Science 2020 software engineering work
Work requirements https://edu.cnblogs.com/campus/sau/Computer1701-1705/homework/10583
Course objectives Familiar with the development process a "high-quality" software
Jobs goal Unit Testing Practice

A title: and maximum continuous subarray (maximum and sub-segment)

Problem: Given n integer (possibly negative) consisting of a sequence of a [1], a [2 ], a [n] a [3], ...,, find the sequence, such as a [i] + a [i + 1] + ... + a [j ] and the maximum value of the sub-segments.
When given definitions are negative integer and sub-segment 0, so defined, the required optimal values: Max {0, a [i ] + a [i + 1] + ... + a [j]} , 1 <= i <= j <= n
For example, when (a [1], a [ 2], a [3], a [4], a [5], a [6]) = (- 2, 11, -4,13, -5, -2), and the maximum of 20 sub-segment.
- quote from the "Baidu Encyclopedia"

II. Code

Source:
maximum continuous subarray and
test code:
the Test

III. Operating results


FIG Test Sample 1 3.1

3.2 Sample Test 2

3.3 Test Sample 3

IV. Unit testing

flow chart:

FIG. 4.1 program flow
test:
{1,3,3,5,6}
{-2,11, -4,13, -5, -2}
{-1, -2, -3, -4}
{ -4, -3, -2, -1, 0}
{1,1,1,1,1}
test results as shown below:

4.2 test results FIG.

Five .PSP0 worksheet

project Record results
date 2020.04.08
Starting time 10:00
End Time 16:10
Coding the number of rows 62+124
The number of errors 0

Guess you like

Origin www.cnblogs.com/sr9121/p/12661460.html