Clean up when deleted
Time complexity: O(1)
Time complexity: O(n)
Time complexity: O(size() + number of elements in e)
Time complexity: O(1)
Time complexity: O(number of elements in e)
Configure the assigned allocator with the size of each allocation block (number of nodes allocated at one time) and the number of nodes to pre-populate the cache with.
Time complexity: O(1)
Time complexity: O(n)
Make an independent copy of the list. Elements themselves are not cloned
Time complexity: O(n) Returns size_t.max if no element found.
Time complexity: O(n)
Time complexity: O(1)
Time complexity: O(1)
Is this container empty?
Return a generic iterator for contained elements
Time complexity: O(n) Returns size_t.max if no element found.
Time complexity: O(1)
Time complexity: O(number of elements in e)
Time complexity: O(n)
Time complexity: O(n)
Time complexity: O(1)
Time complexity: O(n)
Time complexity: O(1)
Time complexity: O(n)
Time complexity: O(n)
Reset the HashMap contents and optionally configure a new heap manager. This releases more memory than clear() does
Return the number of elements contained
Time complexity: O(length)
Time complexity: O(1)
Time complexity: O(1)
Time complexity: O(n)
Copy and return the contained set of values in an array, using the optional dst as a recipient (which is resized as necessary).
auto list = new CircularList!(int); list.add(1); list.add(2); list.add(3); int i = 1; foreach(v; list) { test(v == i); i++; } auto iter = list.iterator; iter.next(); iter.remove(); // delete the first item i = 2; foreach(v; list) { test(v == i); i++; } // test insert functionality iter = list.iterator; iter.next; iter.insert(4); int[] compareto = [2, 4, 3]; i = 0; foreach(v; list) { test(v == compareto[i++]); }
Circular linked list