Lists in Dart are dynamically sized unless you specify a size at creation.
So I would think the dynamically sized one would work like ArrayList in Java, and the statically sized one would work like [] in Java.
Is this correct, or is it always O(1) access? Or always O(n) access?
I haven't been able to find any resources about this online.
The runtime complexity is of course O(1).
I haven't found a list implementation in Dart core where it might be O(n) but I might have missed one.
I assume it would be O(n) for https://api.dartlang.org/stable/1.24.3/dart-collection/LinkedList-class.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With