the next problem of the problem-solving guide is actually number 24, swap nodes in pairs, that's too hard for me. so i choose 203 to get familiar with single linked nodes first. my first several rounds of submission failed and i updated several times and it finally submitted successfully. today when i checked the solution, i learned from the poster to make a list of edge cases before writing any code, i think that's better than update every time when it fails. it will be more effective and i can also practice writing edge cases beforehand.
my code is not that neat cause i have a conditional statement of iterator node which is actually intermediate code when debug failed edge case. so if i get edge cases beforehand, there won't be such dirty code.
i also updated head node every time when head node value is target value. cause i use dummy node directly as iterator node, in the solution she create a new variable as iterator so the dummy node aways point to head node.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)