摘要: 一. 先画一个单链表,这个单链表有4个元素。思路就是,每次把第二个元素提到最前面来。比如下面是第一次交换,我们先让头结点的next域指向结点a2,再让结点a1的next域指向结点a3,最后将结点a2的next域指向结点a1,就完成了第一次交换。 第一次交换 然后进行相同的交换将结点a3移动到结点a2 阅读全文
posted @ 2016-10-05 17:04 天涯路清晨 阅读(306) 评论(0) 推荐(0) 编辑
摘要: 1 题目 You are giventwo linked lists representing two non-negative numbers. The digits are storedin reverse order and each of their nodes contain a sing 阅读全文
posted @ 2016-10-05 14:10 天涯路清晨 阅读(377) 评论(0) 推荐(0) 编辑