in reply to Puzzle: Longest Increasing Sequence
I'll give you a hint. Look up Patience Sorting.
-Mark