|
Data Structures and Algorithms
with Object-Oriented Design Patterns in Ruby |
(, ), [, ], , and .
We say that S is balanced if it has one of the following forms:
class MultipleStack < Container
def initialize(numberOfStacks) ...
def push(obj, whichStack) ...
def pop(whichStack) ...
# ...
end