3 ms·
OP here. In hindsight, this is 100% correct. Hopefully this post will help people avoid my mistakes.
by rusbus 9y ago
OP here. In hindsight, this is 100% correct. Hopefully this post will help people avoid my mistakes.
- amelius 9y agoJust out of curiosity, didn't you do a google-search for "linked list in Rust" when you ran into problems? Or isn't that your style? :) Anyway, thanks for the thought-provoking post.
- rusbus 9y agoI did. I found the book of linked lists at the bottom of the post. After reading and appreciating the complexity I didn't want to deal with, I just wrote it in Go
- littlestymaar 9y agoNo jugement here, but I curious to understand your situation: if you didn't want to deal with the complexity of the implementation, why didn't you just import a linked list from the standard library ? Did you just want to implement a linked list for learning, but still put the minimum effort in the process ?
- rusbus 9y agoThe standard library linked list doesn't support inserting in the middle