自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

我的文档

技术 生活 无所不记,好记性不如赖笔头

  • 博客(5)
  • 收藏
  • 关注

原创 leetcode Excel Sheet Column Title

Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB 关键在于n是先

2015-03-06 13:01:08 345

原创 leetcode Majority Element

Given an array of size n, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋ times.You may assume that the array is non-empty and the majority element

2015-03-04 21:18:14 336

原创 leetcode Excel Sheet Column Number

Excel Sheet Column NumberRelated to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1

2015-03-04 20:24:38 398

原创 leetcode Factorial Trailing Zeroes

Given an integer n, return the number of trailing zeroes in n!.Note: Your solution should be in logarithmic time complexity.编程之美上有算法,简单讲就是把n!分解因子为...2^x 3^y 5^z .....但是对0有贡献的只有2和5,并且2的个数

2015-03-04 19:57:51 353

原创 leetcode Rotate Array

注意边界条件class Solution {public: void reverse(int nums[], int front, int end) { int last = end - 1; while (front < last) swap(nums[front++], nums[last--]);

2015-03-04 19:54:41 328

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除