summaryrefslogtreecommitdiff
path: root/lib/data_structures/dynamic_array_stack.rb
blob: a709956590d6048be8211d0fd4ae14e8a912f87d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
class DynamicArrayStack
  def initialize(items = [])
    @items = items
  end

  def pop
    @items.pop
  end

  def push(item)
    @items.push(item)
  end
end