4 ms·
That's true when you have a `vector<node>`, but the structure was described as a `vector<node*>`. So what's adjacent to your current position is the pointer to
by jdmichal 10y ago
That's true when you have a `vector<node>`, but the structure was described as a `vector<node*>`. So what's adjacent to your current position is the pointer to the next node, not the node itself.
Which one is optimal depends a lot on the size of a `node`, as moving elements around in the DOM will require memory copies in the first case.