Tell me more ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am interested in learning about algorithms.

I have taken algorithms course, but didn't feel I really learned as much as I would have loved to. I am looking for some interesting software which I can build, which involves a good subset of all the important algorithms like B-trees, kd-trees, union-find, graph algorithms etc. may be involves some dynamic programming. Obviously it is not going to be something trivial. But I am ready to spend some time everyday to build this software. I feel this way I can appreciate algorithms and good software engineering. I am open to all kinds of suggestions.

share|improve this question
1  
You don't need a piece of software, although that will help you learn where to use it. Just write the B-tree, and then write some tests that exercise it. You can even run some performance timers on it to see which operations (insert, delete, change, etc.) run faster than others. – Robert Harvey Feb 11 at 21:43
@RobertHarvey Care to help out on what we can do to resurrect this question from the pit of closed questions? He's a new user and this is not a good welcome mat. – Guy Coder Feb 11 at 22:04
A MIX or MMIX emulator so you can then use it to put to use implementing all those problems found in TAOCP. – MichaelT Feb 12 at 3:44

closed as off topic by MichaelT, gnat, Robert Harvey, World Engineer, ElYusubov Feb 11 at 22:00

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.

1 Answer

This is no small task but definelty one that will put a feather in your cap and make you dig deep to really understand what is going on. Write a compiler in an object-oriented language, i.e. use state, then write it again in a functional language trying not to use mutable variables, i.e. without state.

You can also take a crack at traslating code in AI books into your favorite language.

I was thinking of writing a compiler for C as it is got a fairly simple grammar. Do you think its worth doing it for an x86 architecture. I mean nothing close to gcc, but able to compile a small subset of C into x86?

Since you were after learning alogrithms, it was the first part of the compiler of getting it to the AST that I was thinking. If you want to create a compiler for C take a look at using LLVM instead of x86.

share|improve this answer
Nah. He needs to write software for a sentient robot. – Robert Harvey Feb 11 at 21:53
@RobertHarvey Bazinga – Guy Coder Feb 11 at 21:56
@GuyCoder Thanks a ton. I was thinking of writing a compiler for C as it is got a fairly simple grammar. Do you think its worth doing it for an x86 architecture. I mean nothing close to gcc, but able to compile a small subset of C into x86? – mc_87 Feb 12 at 1:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.