Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re^2: Find Length Of Longest Ascending/Descending Sequence

by Fletch (Chancellor)
on May 10, 2011 at 19:08 UTC ( #904017=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    import Data.List (sort,tails)
    
    ...
                 "16060437323320876543354855484294170848344644764967947362
    +3104",
                 "78796640372485356789004027625810549218342470476191585852
    +4942",
                 "23456532982436100867707549226413076264717737053820267894
    +9041" ]
    
  2. or download this
    $ runhaskell ascruns.hs
    (5,"21098")
    ...
    (6,"876543")
    (6,"567890")
    (5,"23456")
    
  3. or download this
    longestSeq p s = maximum tuples
                     where ts = tails s
    ...
    (5,12,"21098")
    (5,37,"45678")
    (5,35,"67890")
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2014-11-26 21:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (174 votes), past polls