August 13, 2019 Learn » Re: How should I sort a doubly linked list the D way? | |||
|---|---|---|---|
| |||
...for sorting operations. No new nodes are added and no nodes are permanently removed. I... | |||
August 13, 2019 Learn » Re: How should I sort a doubly linked list the D way? | |||
|---|---|---|---|
| |||
...list) {
Node*[] nodes;
foreach (i; 0 .. list.size)
nodes ~= get_node(list, i);
nodes.sort... | |||
August 13, 2019 Learn » Re: How should I sort a doubly linked list the D way? | |||
|---|---|---|---|
| |||
...wrote: >> Convert the nodes into an D array, sort the array with nodes.sort!"a... | |||
August 13, 2019 Learn » Re: How should I sort a doubly linked list the D way? | |||
|---|---|---|---|
| |||
...but reuses the already allocated nodes
auto anotherSortedList = anotherList.nodes
.array
.sort!((n1, n2) => n1... | |||
August 13, 2019 Learn » Re: How should I sort a doubly linked list the D way? | |||
|---|---|---|---|
| |||
...Node* nodes[buf_size]; and then loop over it, filling it with (2) nodes[i... | |||
August 13, 2019 Learn » Re: How should I sort a doubly linked list the D way? | |||
|---|---|---|---|
| |||
Convert the nodes into an D array, sort the array with nodes.sort!"a.x... | |||
August 13, 2019 Learn » Re: Local static class fields | |||
|---|---|---|---|
| |||
...two functions while the creation of new nodes is widespread, this special-casing of roots... | |||
August 13, 2019 Learn » How should I sort a doubly linked list the D way? | |||
|---|---|---|---|
| |||
...struct DLL {
Node* head;
uint size;
};
Node** nodes = cast(Node**) malloc(DLL.size * (Node*).sizeof... | |||
August 13, 2019 General » Re: Reggae [was Building C++ modules] | |||
|---|---|---|---|
| |||
...rest of the compiler only on AST nodes that is dependent on the "bar" token... | |||
August 13, 2019 Learn » Re: Local static class fields | |||
|---|---|---|---|
| |||
...hold the "global" state and it requires nodes to have an accessor(they won't... | |||
Copyright © 1999-2021 by the D Language Foundation