What are the advantage/disavantages of building a doubly linked list by using either circular pointer and tail pointer ? which one is preferrable for building a deque ?
From my opinion, they are pretty much the same in doing all the search, insert, and delete node. The only thing that is different is, for the tail pointer doubly linked list, you need to have a tail pointer points to the last node and you need to update it every time when you insert a new node after the tail. Moreover, in the circular linked list, you have the first node linked to the last node and vice-versa, while in the tail pointer, you have both of the head->prev and tail-> point to null pointer. I think both of them are greate for building a deque. It all comes down to exactly how you want your program runs. If you want your program can run back and forth between the head and tail node fast, use the circular approach, otherwise, tail pointer should be sufficient.
That is my answer to the question. Since I have not built any circular doubly linked list yet, I do not have any experience on how it runs on the machine, but I suspect it will be as fast as the tail pointer. Any suggestion at all ? And thank you everyone for their inputs.