Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I don't know of any useful algorithms offhand that aren't available in perl (since I havn't looked) but here are some algorithms you should try, if only for the experience gained.

Definatly, absolutly, try some Red Black trees.. Graph-related algorithms are some of my favorite. Djaikstra's Algorithm and others are also fun. Pick up your Data Structures book and just start going at it for any of them that you can't find on CPAN. I doubt Perl actually is used so often for Graph applications though, as they're often seriously computationally intensive and you'd want them a little more optimized.

There's an algorithm for constant time array initialization algorithm that I really really like. It's a memory hog (uses 3 arrays instead of one) but it has it's uses.

I've been deriving (since I can't find one online) a Array_Combinator algorithm which will enumerate and return all possible combinations (not permutations) of a given number of elements in an Array (that'll make more sense when I post it Monday).

For more educational pleasure, go impliment a simple standard encryption/decryption algorithm, like RSA. I did that for a math class once, and it was more difficult than I expected, but worth it.

Honestly, most anything useful that you'll study in this class will already be on CPAN or simply can't be generalized enough to be made into a module (like the constant time array initialization. It's just not that advanced enough of a class if you are still studying Red-Black trees. ;) I'll pick up a couple of my textbooks tonight and see if I can find anything else for ya though.

-Lexicon


In reply to Re: Data Structures wanted; apply within. by Lexicon
in thread Data Structures wanted; apply within. by Falkkin

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-26 00:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found