Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^3: Puzzle: Longest Increasing Sequence

by kaif (Friar)
on Apr 16, 2006 at 17:10 UTC ( #543661=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Puzzle: Longest Increasing Sequence
in thread Puzzle: Longest Increasing Sequence

Well, no, you only need to keep at most one increasing subsequence for each length. In your example, you can forget about the 9, 7, 5, and 3 entirely. Any increasing subsequence beginning with them will be just as long if they begin with the 1 instead.


Comment on Re^3: Puzzle: Longest Increasing Sequence

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://543661]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (14)
As of 2015-07-31 19:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (280 votes), past polls