I wanted to know if my time complexities regarding the following points along with the reasoning are correct or not.
- Insertion at the end of a dynamic array is O(1) and anywhere else in O(n) (since elements might need to copied and moved) (resembling a std::vector)
- Searching through a single link list is O(n) since its linear.
- Insertion and deletion in a single link list could either be O(1) or O(n). It is O(1) if the address to the node is available otherwise its O(n) since a linear search would be required.
I would appreciate feedback on this