mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-04 00:18:02 +00:00
Tweak algorithm, no need to set the curr node as it is passed in. Added check for error cases.
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
"\n",
|
||||
"We'll need two pointers, one to the current node and one to the next node. We will copy the next node's data to the current node's data (effectively deleting the current node) and update the current node's next pointer.\n",
|
||||
"\n",
|
||||
"* Set curr and next pointers\n",
|
||||
"* Check for error cases listed above\n",
|
||||
"* set curr.data to next.data\n",
|
||||
"* set curr.next to next.next\n",
|
||||
"\n",
|
||||
|
||||
Reference in New Issue
Block a user