Reverse Integer 解题总结
1.把integer转为String,利用StringBuilder有reverse方法;
2.构造函数StringBuilder如果是int参数代表是capacity而非想象中的那样;
3.难点是判断溢出问题(虽然不判断可以AC通过),简单的方法是利用long来保留翻转之后的结果,而后和 Integer.MIN_VALUE, Integer.M...
分类:
其他好文 时间:
2014-09-06 21:20:14
阅读次数:
227
Given a linked list, swap every two adjacent nodes and return its head.For example,Given 1->2->3->4, you should return the list as 2->1->4->3.Your alg...
分类:
其他好文 时间:
2014-09-06 13:39:03
阅读次数:
177
Given a singly linked listL:L0→L1→…→Ln-1→Ln,reorder it to:L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.For exam...
分类:
其他好文 时间:
2014-09-06 12:20:43
阅读次数:
223
Given a linked list, reverse the nodes of a linked list k at a time and return its modified list.If the number of nodes is not a multiple of k then le...
分类:
其他好文 时间:
2014-09-06 12:20:23
阅读次数:
171
VS2013上使用EF Power Tools的Reverse Engineer Code First逆向生成。发现数据库中的decimal(18, 4)字段在生成的mapping类中没有精度和小数位数。这使得通过EF保存数据时,自动生成的SQL缺省使用了decimal(18, 2).还好EF Po...
分类:
数据库 时间:
2014-09-06 02:13:12
阅读次数:
355
HDU 1266 Reverse Number(字符串逆转 水题)...
分类:
其他好文 时间:
2014-09-05 19:58:01
阅读次数:
163
Binary Tree Level Order Traversal II
Total Accepted: 16983 Total
Submissions: 54229My Submissions
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie...
分类:
其他好文 时间:
2014-09-05 18:22:41
阅读次数:
212
Binary Tree Level Order Traversal
Total Accepted: 20571 Total
Submissions: 66679My Submissions
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left t...
分类:
其他好文 时间:
2014-09-05 18:22:21
阅读次数:
271
Binary Tree Postorder Traversal
Total Accepted: 28560 Total
Submissions: 92333My Submissions
Given a binary tree, return the postorder traversal of its nodes' values.
For example:
Given...
分类:
其他好文 时间:
2014-09-05 16:09:01
阅读次数:
172
javascript reverse string
分类:
编程语言 时间:
2014-09-05 14:11:21
阅读次数:
211