Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
SAI_Peregrinus
· 9y ago · 0 comments
Wouldn't that make it (even more) trivial, since you can just traverse from the tail backwards? Assuming it has a tail pointer, of course.
Comments
[–]
nolepointer
9y ago
Yeah, I suppose so. I only asked because reversing a singly-linked list just seems like a PitA.
[–]
duskwuff
9y ago
Reversing a singly-linked list is actually
easier
: you take each element off the front of the old list and put it onto the front of the new list.