I recently stumbled on this problem and I really couldn\'t find an easy way of solving this.
Let\'s say I have a linked list in C++ where each node is such defined: