3 ms·
It seems that this implementation of a list is more useful when used like a stack. As a general list (with more operations than "pop" and "push"), not so great
by mangodrunk 7y ago
It seems that this implementation of a list is more useful when used like a stack. As a general list (with more operations than "pop" and "push"), not so great in terms of performance compared to one that is mutable.
I did like the article and how the author writes so simply. To the author's credit, right below, they do have the section on "When you can't help it", which if you do need insertion like that and performance matters, probably best to use a mutable data structure.