I got a bit confused about analzsis of data structure base operation like inserting or deleting.
when I am asked about creating an data structure that support deleting operation, or inserting in O(1), (or any big O):
-
For deleting do I need take in account the searching of this element or only the deleting operation it self, for example changing the pointers?
-
For the inserting do I need to take in account the searching of the index/point where I need to place the element
I look a bit in the Interant but I got diffrenet time complexity for the basic data structure i search for like array, I saw both O(1) and O(N)