I am wondering does the size() function returns an internal stored variable (which gives the size of the linked list) or does it iterates over the list and counts the nb of elements?
I am wondering does the size() function returns an internal stored variable (which gives
Share
It just returns the stored number of items. The implementation is the following: