Pretty simple, returns the last node as that's the new root node. Uses default parameters to make sure the first node has next set to null.
1.3 KiB
1.3 KiB
Pretty simple, returns the last node as that's the new root node. Uses default parameters to make sure the first node has next set to null.