hi how can i find the number of elements in double linked list.
thank u
sree
hi how can i find the number of elements in double linked list.
thank u
sree
no function like queue
in queue we have
queue.size()
so wht about for double linked list
If you're using std::list, then yes there's a .size() function.
when you create header node for doubly linked list that time keep counter in header node so whenever you add nodes to list then simply increment counter in header node then that header node information will give you number of nodes in list
Last edited by vinod_mrd; 01-25-2008 at 12:19 PM. Reason: spelling mistake