Linked lists are overrated unless you’re doing tons of inserts/deletes. For most cases, a dynamic array with smart resizing is way faster.
If you’re in JS, just use arrays and let V8 optimize it. Otherwise, maybe try a library like Immutable.js for persistent structures?
If you’re in JS, just use arrays and let V8 optimize it. Otherwise, maybe try a library like Immutable.js for persistent structures?
