摘要: Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321题目解析:你要是敢用string解你就输了!!一位一位运算吧骚年, 没啥好解释的, 注意overflow和负数情况就行~ 1 ... 阅读全文
posted @ 2015-02-15 11:29 Sherry是小太阳 阅读(95) 评论(0) 推荐(0) 编辑
摘要: You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ... 阅读全文
posted @ 2015-02-15 11:19 Sherry是小太阳 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Given a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, return1->2.Given1->1->2->3->3, retu... 阅读全文
posted @ 2015-02-15 11:00 Sherry是小太阳 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, determine if it has a cycle in it.Follow up:Can you solve it without using extra space?思路解析:这道题是一道比较经典的面试题啊~without using extra s... 阅读全文
posted @ 2015-02-15 03:26 Sherry是小太阳 阅读(140) 评论(0) 推荐(0) 编辑
摘要: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.题目解析:炒鸡简单... 阅读全文
posted @ 2015-02-15 00:07 Sherry是小太阳 阅读(106) 评论(0) 推荐(0) 编辑