2

I've been told that the best way to learn a programming language is to implement some data structures in it. I am currently learning Ruby and I would really love to code some data structures like Tries, AVL etc. Are there any sites out there which outline how to go about doing this and can suggest exercises and optimizations based on the same. Any help would be greatly appreciated. Thanks.

5 Answers 5

6

You can also start with Ruby Code Kata. They are seemingly real world problems with almost always an algorithm based problem lying underneath.

There are discussion forums available there to discuss each Kata, so that your feedback loop for learning would be completed.

Sign up to request clarification or add additional context in comments.

Comments

3

Here's a free online book on creating data structures with Ruby:

http://www.brpreiss.com/books/opus8/

1 Comment

-1. That's an incredibly terrible book with completely un-idiomatic, non-OO Ruby code. If you want to learn how to write 1980s C code in Ruby syntax, this is the right book for you, if you want to learn how to write Ruby, stay as far away from it as you can.
0

I would recommend learning the basics first, since they lay the foundation. Start simple with things like linked lists, binary search trees, stacks etc.

Comments

0

You can also look at TopCoder Tutorials.

Comments

0

PuzzleNode.com helped me.

There are 15 problems. You can finish in a day or two, longer if you plan on test driving the solutions. I like to think of each problem as being larger than a kata, but smaller than trying to implement a tic tac toe game in Ruby. You'll be exposed to parsing in Ruby, data structures and using possibly gems based on your implementation. There also fun; good luck!

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.