3nd专题

Solutions_to_Introduction_to_Algorithm_3nd_Exercise_4

4.1-1 What does FIND-MAXIMUM-SUBARRAY return when all elements of A are negative?   The biggest negative one. 4.1-2 Write pseudocode for the brute-force method of solving the maximum-subarray problem.

Solutions_to_Introduction_to_Algorithm_3nd_Exercise_3

3.1-1 Let f(n) and g(n) be asymptotically nonnegative functions. Using the basic definition of Θ-notation, prove that max(f(n),g(n))=Θ(f(n)+g(n)).   Let f(n),g(n) be asymptotically nonnegative. Show t