9.5. Conclusion

We’ve taken a look here at the Set class in Ruby as well as a few examples of “home-grown” data structures. Where more advanced data structures are concerned, we’ve seen examples of inheriting from an existing class and examples of limited delegation by encapsulating an instance of another class. We’ve seen ways to store data creatively, ways to use various data structures, and how to create iterators for these classes.

We’ve looked at stacks and queues in general, and how they might be used in problem solving. We’ve taken a cursory look at trees and graphs.

In the next chapter, we are again looking at the manipulation of data. But where we have so far been concerned with objects stored in memory, we will now be looking at secondary ...

Get The Ruby Way: Solutions and Techniques in Ruby Programming, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.