Блог пользователя f.nasim

Автор f.nasim, 16 лет назад, По-английски
Given an unsorted sequence A={a0,a1,a2,......an-1} of n integers. How do I find the longest increasing sub-sequence of the given sequence. Is there any dynamic programming solution.
  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

16 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится
Just google for "longest increasing subsequence" and you'll find it...
16 лет назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится
It can be solved very easy with O(N^2) by DP.
Do you need this solution?
16 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится
BTW, my favourite problem on LIS is problem J from NEERC 2004 "Joke with turtles".
You can try to solve it here: http://acm.tju.edu.cn/toj/showp2400.html