3 ms·
This is exactly what Linus's code does. "indirect" is just "dummy->next" but doesn't pay the extra space cost for the node value. If writing this code in a hi
by dpark 10y ago
This is exactly what Linus's code does. "indirect" is just "dummy->next" but doesn't pay the extra space cost for the node value.
If writing this code in a higher level language, I think the dummy node would be more appropriate and idiomatic despite the slight increase in space.