Longest increasing subsequence.
topcoder ZigZag, Dynamic programming  TopCoder Collegiate Challenge Semifinal Round 3 - Division I, Level One