Solve queue with double linked list