摘要: Given a linked list, swap every two adjacent nodes and return its head. You may not modify the values in the list's nodes, only nodes itself may be ch 阅读全文
posted @ 2019-12-29 12:06 xuan_abc 阅读(90) 评论(0) 推荐(0)
摘要: Reverse a singly linked list. Example: Input: 1->2->3->4->5->NULL Output: 5->4->3->2->1->NULL Follow up: A linked list can be reversed either iterativ 阅读全文
posted @ 2019-12-29 11:59 xuan_abc 阅读(119) 评论(0) 推荐(0)