摘要:
Given a linked list and a valuex, partition it such that all nodes less thanxcome before nodes greater than or equal tox.You should preserve the origi... 阅读全文
posted @ 2015-12-24 18:02
sdlwlxf
阅读(130)
评论(0)
推荐(0)
摘要:
本题与之前单链表逆置不同的是,加入了范围判断。依然沿用之前单链表逆置的方法,只需要再做好起始节点和末尾节点的判断说起来容易,做起来复杂,特别是单链表,很容易把人搞晕,所以,在编程之前最后画图理清思路。这次在头结点的处理上,不同于以往设置临时头结点的方法,使用了二级指针,这种方法写出来的代码可能比较少... 阅读全文
posted @ 2015-12-24 17:47
sdlwlxf
阅读(140)
评论(0)
推荐(0)