Booking Queue/queue.rb
# Inserts a new element into the back of the queue
Inserts a new element into the back of the queue
Inserts a new element into the back of the queue
def enqueue(data)
    node = Node.new data
    if front
      back.next = node
    else
      self.front = node
    end
    self.back = node
    self.size += 1
  end
def enqueue ( data ) node = Node . new data if front back . next = node else self . front = node end self . back = node self . size += 1 end
Inserts a new element into the back of the queue
Inserts a new element into the back of the queue
data