Implementing Eller's Algorithm

Learn how to implement Eller's algorithm using Ruby.

The Ellers class

Eller’s algorithm works strictly one row at a time, so our implementation will take advantage of that by leaning on a row-centric state object. Once we have that state object, the rest of the algorithm comes together quickly. We’ll start with the RowState class, which we’ll place under the namespace of the Ellers class. So, let’s first create the RowState class.

The RowState class

Get hands-on with 1400+ tech skills courses.