Check out the Deque interface...