I want to create the following as data stracture in JavaScript.
a container of ordered items
each item has an id, and it can be found and deleted in o(1)
an oreded slice of the container can be retrieved without changing the original container.
an item can be inserted at a specific position in o(1)
I thought to use an array (a=[]) of <items>s with address maping object (b={}) of <item_id, position_in_array>.
Any other ideas?