Persistent queue data structure implementation based on two linked lists