I think I have stumbled upon a novel data structure.
Does there exist one where i can add and delete elements at a particular index, both efficiently (better than linear time)? It is not a requirement that the elements in the structure be indexed by their order. For example, elements can be stored as 5, 2, 8, 1, 3, 3. DataStructure[2] will give 8 and del DataStructure[2] will delete 8.
New contributor
Gursimar Singh Miglani is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.