deque.rb

lib/containers/deque.rb
Last Update: Sun Mar 29 01:22:00 -0400 2009

A Deque is a container that allows items to be added and removed from both the front and back, acting as a combination of a Stack and Queue.

This implementation uses a doubly-linked list, guaranteeing O(1) complexity for all operations.

Required files

  1. CDeque

Constants

Deque = Containers::CDeque
Deque = Containers::RubyDeque