摘要: 题目: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 ... 阅读全文
posted @ 2016-01-21 22:08 zhangbaochong 阅读(266) 评论(0) 推荐(0) 编辑
摘要: 假设单链表数据结构定义如下: struct ListNode { int val; ListNode *next; ListNode(int x) : val(x), next(NULL) {} };单链表有一个头指针指向第一个结点,最后一个结点指向NULL一、最容... 阅读全文
posted @ 2016-01-21 21:39 zhangbaochong 阅读(9230) 评论(0) 推荐(1) 编辑