Consideration
- make three pointers , pre,current,next;
- initial pre as null
- use tmp to save current’s next node info
- change current’s next to link pre node(first is null)
- move pre pointer to next node
- move current pointer to next node
soultion
|
|
- 原文作者:浮华生
- 原文链接:https://www.ahianzhang.com/post/leetcode206/
- 版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议进行许可,非商业转载请注明出处(作者,原文链接),商业转载请联系作者获得授权。