Friday, January 20, 2012

Longest Increasing Sequence

Algorithm : Two ways.
1. LCS with one array - being input array a[]; second array - sort input array b[];
So complexity = nlogn (for sort) + DP

2. Another approach
Algorithm: http://www.algorithmist.com/index.php/Longest_Increasing_Subsequence
Impl: http://www.algorithmist.com/index.php/Longest_Increasing_Subsequence.c

No comments:

Post a Comment