Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I'm currently enrolled in a Data Structures & Algorithms class. A fair portion of the class involves coding some common algorithms. Unfortunately, the languages used for the class are Java and C++, but I figured it would be good practice to try implementing a few of these algorithms in Perl.

Most of the algorithms described in our text (the White Book, by Cormen, Leiserson, and Rivest) are rather slick, and I can see that many of them would make useful Perl modules. As long as I've committed myself to implementing some of these algorithms in Perl, I figured I might as well make my results into modules, with the eventual intent that they might (if properly done) end up in CPAN.

Unfortunately (for me), quite a few of the interesting algorithms, such as Boyer-Moore string searching and hashtables, are already Perl built-ins, and most of the others (such as a variety of heaps, red/black trees, and efficient sorting algorithms) are already in CPAN. Thus, I have a few questions to ask of my fellow monks:

  • What are some interesting algorithms that you've personally implemented and found enlightening? The main point of my little project here is to enhance my learning, so if there are any algorithms or data structures that have somehow fundamentally changed how you think about programming, I'd be very interesting in knowing about them.
  • Are there any data structures/algorithms modules not on CPAN that should be implemented?
  • Are there any modules on CPAN that you've used and found somehow deficient? If there are any modules that simply need maintenance, a code review, or better documentation, I'd be willing to talk to the authors and ask if they'll take my help.

To let you know what I'm presently thinking, here are a few options I'm pondering:

  • The Graph package, by Jarkko Hietaniemi, appears to be derived straight from Mastering Algorithms with Perl, and is relatively complete. The only irk I have with it is the documentation, which (in my opinion) could be better. I may end up playing with these modules a bit and seeing if I couldn't write some better documentation for them.
  • Another possibility with the Graph modules would be to create a GUI front-end that allows the user to create instances of graphs in a graphical environment and perform various operations on them. I don't see this sort of thing as a very practical application, but perhaps it could be used to teach basic graph theory or to solve simple graph problems.
  • Implementing a basic decision-tree structure. There doesn't seem to be one on CPAN, and I could create a decision tree based on the Tree::Nary module. This would be interesting to me because I'm interested in AI (mostly for the purposes of game-playing, though ;)).
Thank you, in advance, for any comments or suggestions you may have. :)

In reply to 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 having an uproarious good time at the Monastery: (6)
As of 2024-03-28 16:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found