3 ms·
That is true, but one generally doesn't care about the best case. It's a good point though. (Also, if data is a linked-list, length() could be an O(n) operatio
by rcfox 15y ago
That is true, but one generally doesn't care about the best case. It's a good point though.
(Also, if data is a linked-list, length() could be an O(n) operation. That would make this O(n^3) or O(n^4) ;))