摘要: Given a sorted linked list, delete all duplicates such that each element appear only once. Example 1: Input: 1->1->2 Output: 1->2 Example 2: Input: 1- 阅读全文
posted @ 2019-12-30 11:58 xuan_abc 阅读(84) 评论(0) 推荐(0)
摘要: Reverse a linked list from position m to n. Do it in one-pass. Note: 1 ≤ m ≤ n ≤ length of list. Example: Input: 1->2->3->4->5->NULL, m = 2, n = 4 Out 阅读全文
posted @ 2019-12-30 11:08 xuan_abc 阅读(161) 评论(0) 推荐(0)
摘要: Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the 阅读全文
posted @ 2019-12-30 01:03 xuan_abc 阅读(128) 评论(0) 推荐(0)