MCS in length L(Maximum consecutive subsequence in length L)

Let's talk about algorithms!

Moderator: Board moderators

Post Reply
cplusplus
New poster
Posts: 13
Joined: Fri Feb 07, 2003 10:20 pm

MCS in length L(Maximum consecutive subsequence in length L)

Post by cplusplus »

Hello everyone~

It's easy to solve MCS in O(N) with array of lenth N

here is another similiar question

Find the MCS with length not greater than L in O(N) (not O(NL))

Does anyone the algorithms to solve it?

any information will be great~

Thank you very much~
Monsoon
Learning poster
Posts: 66
Joined: Fri Jul 23, 2004 4:42 pm
Location: Poland

Post by Monsoon »

this is probably that you wish to see:

http://www.csie.ntu.edu.tw/~kmchao/seq04spr/jcss.pdf
cplusplus
New poster
Posts: 13
Joined: Fri Feb 07, 2003 10:20 pm

Post by cplusplus »

Thank you so much!!

I'd thought an algorithm that similiar to the one proposed in the papaer

but I thought it would be O(N^2) in worst case, don't know it is O(N)

actually by amortized analyze...

Thank your so much!!!! :D
Post Reply

Return to “Algorithms”