[LeetCode] Merge Two Sorted Lists, Solution

摘要: 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.» Solve... 阅读全文
posted @ 2013-03-17 05:06 小刀初试 阅读(185) 评论(0) 推荐(0)

恩,我用了double...精度比float更高,所以没出溢出问题。

摘要: 恩,我用了double...精度比float更高,所以没出溢出问题。 阅读全文
posted @ 2013-03-17 01:42 小刀初试 阅读(180) 评论(0) 推荐(0)

我也写了一个牛顿迭代法,貌似不需要特殊处理溢出的情况 class Solution { public...

摘要: 我也写了一个牛顿迭代法,貌似不需要特殊处理溢出的情况class Solution {public:int sqrt(int x) {if (x ==0) return 0; double pre_t; double cur_t = 1; ... 阅读全文
posted @ 2013-03-17 01:38 小刀初试 阅读(514) 评论(0) 推荐(0)