deque.rb

lib/containers/deque.rb
Last Update: 2013-05-16 14:38:07 -0400

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