pub fn findLast(node: *Node) *Node
Iterate over the singly-linked list from this node, until the final node is found.
This operation is O(N). Instead of calling this function, consider using a different data structure.
node: *Node
45 46 47 48 49 50
pub fn findLast(node: *Node) *Node { var it = node; while (true) { it = it.next orelse return it; } }
Iterate over the singly-linked list from this node, until the final node is found.
This operation is O(N). Instead of calling this function, consider using a different data structure.