![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LeetCode
文章平均质量分 68
raymond_YPY
业精于勤,荒于嬉
展开
-
LeetCode笔记
48. Rotate Image /* * clockwise rotate * first reverse up to down, then swap the symmetry * 1 2 3 7 8 9 7 4 1 * 4 5 6 => 4 5 6 => 8 5 2 * 7 8 9 1 2 3 9 6 3 */ /* * anticlo原创 2017-01-08 07:51:52 · 238 阅读 · 0 评论 -
56. Merge Intervals
笨办法 /** * Definition for an interval. * struct Interval { * int start; * int end; * Interval() : start(0), end(0) {} * Interval(int s, int e) : start(s), end(e) {} * }; */ cla原创 2017-01-09 08:31:36 · 221 阅读 · 0 评论 -
50. Pow(x, n)
class Solution { public: double myPow(double x, int n) { if(n==0) return 1; if(n==1) return x; if(n>INT_MAX||n<=INT_MIN) if(x==1||(x==-1&&n%2==0)) return 1; else if(x==-1&&n%原创 2017-01-09 03:09:30 · 520 阅读 · 0 评论