自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(3)
  • 收藏
  • 关注

原创 leetcode-121

Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock),

2016-04-13 01:32:50 159

原创 求杨辉三角的第n行

int* getRow(int rowIndex, int* returnSize) { if (rowIndex 0) return NULL; int *res = (int*)malloc(sizeof(int) * (rowIndex + 1)); for (int row = 0; row <= rowIndex; row++) for (int col = row

2016-04-13 01:20:38 3883

原创 leetcode

字符串转整数: version1 = 0; version1 = 10*version1 + (*v1 - '0'); v1存在的时候一直往后,从v[0]->v[n]。 找一个数组中出现n/2次以上的数 int majorityElement(int* nums, int numsSize) { int i,j,k,count=0;     j=nums[0]; for

2016-04-11 23:27:34 162

空空如也

空空如也

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

TA关注的人

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