Reverse a singly linked list.
click to show more hints.
Hint:
A linked list can be reversed either iteratively or recursively. Could you implement both?
使用迭代和递归实现单链表的反转。
迭代的方法之间在剑指offer上面...
分类:
其他好文 时间:
2015-07-30 13:38:43
阅读次数:
114
Determine whether an integer is a palindrome. Do this without extra space.Some hints:Could negative integers be palindromes? (ie, -1)If you are thinki...
分类:
其他好文 时间:
2015-07-28 00:31:41
阅读次数:
124
题目:
Determine whether an integer is a palindrome. Do this without extra space.
Some
hints:
Could negative integers be palindromes? (ie, -1)
If you are thinking of converting the integer to...
分类:
编程语言 时间:
2015-07-07 19:34:48
阅读次数:
129
9 Palindrome Number链接:https://leetcode.com/problems/palindrome-number/
问题描述:
Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:
Could negat...
分类:
其他好文 时间:
2015-07-01 18:26:10
阅读次数:
111
Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:Could negative integers be palindromes? (i...
分类:
其他好文 时间:
2015-06-30 12:47:25
阅读次数:
82
Determine whether an integer is a palindrome. Do this without extra space.click to show spoilers.Some hints:
Could negative integers be palindromes? (ie, -1)If you are thinking of converting the inte...
分类:
其他好文 时间:
2015-06-28 21:42:54
阅读次数:
133
As suggested by the hints, this problem is equivalent to detect a cycle in the graph represented by prerequisites. Both BFS and DFS can be used to sol...
分类:
其他好文 时间:
2015-06-28 01:12:24
阅读次数:
252
Reverse Linked List
Reverse a singly linked list.
click to show more hints.
Hint:
A linked list can be reversed either iteratively or recursively. Could you implement both?
反转一个链表,用栈实现
...
分类:
其他好文 时间:
2015-06-23 10:18:18
阅读次数:
117
题目链接:https://leetcode.com/problems/palindrome-number/
Determine whether an integer is a palindrome. Do this without extra space.
click to show spoilers.
Some hints:
Could negative inte...
分类:
其他好文 时间:
2015-06-21 15:52:27
阅读次数:
145
#include #include #define MIN(a,b) (((a) < (b)) ? (a) : (b))int main(){ int code[1000]; int guess[1000]; int C1[10]; // 数字1~9在code中出现的次数,C1[0]未使用 int ...
分类:
其他好文 时间:
2015-06-20 21:58:29
阅读次数:
144