DEV Community

Discussion on: thank u, next: an introduction to linked lists

Collapse
 
iamadamtaylor profile image
Adam Taylor

This is awesome - learnt a lot and enjoyed the references along the way 😀

One question I have - in the remove_value() function because it changes the this.head value does that mean iterating it would start from the removal point?

How would you get it back to the start after removing a value of that is the case?

Collapse
 
aspittel profile image
Ali Spittel

Thanks!! It only changes this.head if we are trying to remove the first value. Otherwise, only the node variables will change!

Collapse
 
iamadamtaylor profile image
Adam Taylor

Ah I see, I read it wrong. Thanks for clarifying!

Thread Thread
 
aspittel profile image
Ali Spittel

For sure!