opened
AlexanderJDupree
username_0
Currently the size() function will traverse the list and count each node, returning the accumulated total. Unfortunately, this means that any call to size() results in O(n) time complexity. 

If we can create a member variable called SIZE, and update it when nodes are deleted or added we can just return the current size and the time complexity will be constant. 

This size member will need to be initialized to zero in the constructors, and updated in each of the modifier functions.
Refactor size() function
issue
created
dsolisherrera
username_1
Hi @username_0 I have submited a pull request for this issue.
comment
created
AlexanderJDupree
username_0
Great job @username_1 thanks for the help. I am completing a data structures course at my University now and will have long task list of projects and feature additions for this and other repos I have made. So, if you want to keep helping out I will be active on my repositories.
comment
closed
AlexanderJDupree
username_0
issue