Data Structures and Algorithms with Object-Oriented Design Patterns in Ruby

Data Structures and Algorithms with Object-Oriented Design Patterns in Ruby

Data Structures and Algorithms with Object-Oriented Design Patterns in Ruby is an online free Ruby book. The primary goal of this book is to promote object-oriented design using Ruby and to illustrate the use of the emerging object-oriented design patterns. Experienced object-oriented programmers find that certain ways of doing things work best and that these ways occur over and over again.


The book shows how these patterns are used to create good software designs. In particular, the following design patterns are used throughout the text: singleton, container, iterator, adapter and visitor.Virtually all of the data structures are presented in the context of a single, unified, polymorphic class hierarchy. This framework clearly shows the relationships between data structures and it illustrates how polymorphism and inheritance can be used effectively. In addition, algorithmic abstraction is used extensively when presenting classes of algorithms. By using algorithmic abstraction, it is possible to describe a generic algorithm without having to worry about the details of a particular concrete realization of that algorithm.

A secondary goal of the book is to present mathematical tools just in time. Analysis techniques and proofs are presented as needed and in the proper context. In the past when the topics in this book were taught at the graduate level, an author could rely on students having the needed background in mathematics. However, because the book is targeted for second- and third-year students, it is necessary to fill in the background as needed. To the extent possible without compromising correctness, the presentation fosters intuitive understanding of the concepts rather than mathematical rigor.

Table of Contents

  • Introduction
  • Algorithm Analysis
  • Asymptotic Notation
  • Foundational Data Structures
  • Data Types and Abstraction
  • Stacks, Queues, and Deques
  • Ordered Lists and Sorted Lists
  • Hashing, Hash Tables, and Scatter Tables
  • Trees
  • Search Trees
  • Heaps and Priority Queues
  • Sets, Multisets, and Partitions
  • Garbage Collection and the Other Kind of Heap
  • Algorithmic Patterns and Problem Solvers
  • Sorting Algorithms and Sorters
  • Graphs and Graph Algorithms
  • Ruby and Object-Oriented Programming
  • Class Hierarchy Diagrams
  • Character Codes

Book Details

Author(s): Bruno R. Preiss
Publisher: Wiley
Format(s): HTML
Link: Read online.

Leave a Reply