LinkedList
LinkedList copied to clipboard
Cache improvement
- cached node link updates on add/remove also
- ListNode has a constructor now, simplifies code, ensures *next is a nullptr if unlinked
- some code sanity checks and cleanup
- add head()/tail()/exist() helpers to make user code simple on Node access/checks
- unit tests updated for new helpers
Really interesting. Its missing a few docs for people to know how to use the new methods. Also, have you tested on arduino platform? is it compliant?
for sure it works pretty fine with Arduino. Overloaded constructors mostly used internally to optimize node adding/creating, not much of a use for user actually, unless you want to create a list of lists :)) The other methods like head()/tail() are pretty obvious, but could be mentioned in examples also.