3 ms·
linked lists shine when you can perform a O(1) remove operation if you have a reference to an object on the list. This is very common when using C structs and n
by waynesonfire 2y ago
linked lists shine when you can perform a O(1) remove operation if you have a reference to an object on the list. This is very common when using C structs and not possible in Java for example.
- adgjlsfhk1 2y agothese cases are usually cases where you want to use a (hash) Set. If you're Ok changing everyone's indexing, the indexing didn't matter.