To insert / remove a node with a specific value in a DLL (a doubly linked list), you need to go through the entire list to find the location, so these operations must be O (n).
If so, why is the STL list (most likely implemented using the DLL) able to provide these operations in constant time?
Thanks to everyone for letting me know.
source
share