Does Dart provide an easy-to-use Linked List? -


i have algorithm that, performance reasons, should use linked list. want constant time appending , removal of elements list, , i'll never need find specific element index.

i see dart has linkedlist (api docs) in dart:collection, requires entries subclass linkedlistentry. don't control elements need put list, , don't want create wrappers.

what options in core dart sdk?

if want add , remove @ both ends, want queue. can either use listqueue (which default when using new queue()) or doublelinkedqueue. former guarantees amortized constant time operations adding , removing @ ends, while latter has absolute guarantees. listqueue need grow backing-store on add, takes linear time, happens when list full, , traditional growing-by-doubling guarantee amortized constant operation.

if want add , remove @ end (a stack, basically), normal list should fine.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -