摘要: 题目: Implement pow(x, n). 链接: http://leetcode.com/problems/powx-n/ 题解: 使用二分法求实数幂,假如不建立临时变量halfPow,直接return计算结果的话会超时,还没仔细研究为什么。 4/15/2017 22ms, 50% 要考虑到 阅读全文
posted @ 2017-04-16 11:22 panini 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 题目: You are given an n x n 2D matrix representing an image. Rotate the image by 90 degrees (clockwise). Follow up:Could you do this in-place? 链接: http 阅读全文
posted @ 2017-04-16 10:16 panini 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a collection of numbers that might contain duplicates, return all possible unique permutations. For example,[1,1,2] have the following uniqu 阅读全文
posted @ 2017-04-16 07:57 panini 阅读(180) 评论(0) 推荐(0) 编辑
摘要: 题目: Given a collection of numbers, return all possible permutations. For example,[1,2,3] have the following permutations:[1,2,3], [1,3,2], [2,1,3], [2 阅读全文
posted @ 2017-04-16 06:27 panini 阅读(238) 评论(0) 推荐(0) 编辑
摘要: 题目: Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The numbers can be arbitrarily large and are non 阅读全文
posted @ 2017-04-16 03:02 panini 阅读(163) 评论(0) 推荐(0) 编辑