Improve linked list traversal by prepending then reversing