Implement queue data structure.