Closed sidoh closed 7 years ago
thanks!
lol, that was fast.
thanks!
I just realized this is wrong. I made a local copy of this code a few weeks ago and made some changes I lost track of. One of those was making the list doubly linked. So the bug was only in my local copy, and there's not actually a root->prev
to speak of in your code.
Probably want to revert this. Sorry for the trouble!
Set prev on old root in
unshift
. Usingunshift
on a non-empty list didn't update the previous pointer of the old root to the newly added node.