Java task

The input consists of a sequence of numbers a[1], a[2, ] . . . , a[n]. Your task is to design an O(n2) algorithm that finds an increasing subsequence with the maximum possible sum. An increasing subsequence is given by a sequence of indices 1 ≤ i1 < i2 < … <...