2 ms·
No you're not. Your function needs to accept two pointers. Your data structure doesn't need to store two pointers. Unless you're storing external pointers to
by dpark 15y ago
No you're not. Your function needs to accept two pointers. Your data structure doesn't need to store two pointers.
Unless you're storing external pointers to every node (in which case you'll actually break even with the traditional implementation in terms of size), you'll still have significant savings. Passing an extra pointer to a function is pretty trivial in terms of size.