摘要: 题目I:Reverse a singly linked list思路:建立三个指针,一个用来维护链表头,另外两个再循环中,维护head的前一位和保存反转的后一位。 逐个反转,首先反转前两个,然后把前两个看成是一个,继续循环反转下去。代码:public class Solution { p... 阅读全文
posted @ 2015-05-19 20:28 可爱的波儿胖 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 题目:The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total num... 阅读全文
posted @ 2015-05-19 10:31 可爱的波儿胖 阅读(418) 评论(0) 推荐(0) 编辑

友情链接 : CodeForge源码分享