3 ms·
Should also consider the cases with zero head pointers. For singly linked lists, a pointer to any node gives you the downstream part of the list, but not the u
by kbob 17y ago
Should also consider the cases with zero head pointers.
For singly linked lists, a pointer to any node gives you the downstream part of the list, but not the upstream. (Can't think of any non-contrived, simple examples.)
For doubly linked lists, each node is effectively a head/tail. The list might be circular or might not. (Lots of kernel data structures where list membership is not the primary index.)
This makes the categorization a little messier.