自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(6)
  • 资源 (1)
  • 收藏
  • 关注

原创 Search in Rotated Sorted Array

Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2 ). You are given a target value to search. If found in the array return its

2017-11-29 09:57:12 147

原创 Container With Most Water

问题: Given n non-negative integers a1,a2...ana_1,a_2...a_n where each represents a point at coordinate a1,a2...ana_1,a_2...a_n vertical lines are drawn such that the two endpoints of line i is at (i,ai

2017-11-26 17:50:57 160

转载 返回局部指针变量

返回值为数值时,返回局部变量可以,而返回值为引用或指针时,则存在风险。局部变量是存在于栈中的,函数被调用时先在栈中为变量申请空间,调用完成释放变量空间。函数在返回参数的时候是这样的,先把要返回的数放在寄存器eax中,然后回到主函数中取出eax中的数值放在变量里,所以这样是不涉及函数中变量地址的。如果要返回引用,也就是变量地址,那么它会把这个变量的地址放在eax中,(注意这个地址是位

2017-11-24 21:07:33 1310

翻译 PCA原理

PCA(Principal Component Analysis),即主成分分析,通常用于数据的降维处理。PCA通过线性变换将原始数据变换为一组各维度线性无关的表示,可用于提取数据的主要特征分量,常用于高维数据的降维。 先从向量的内积(即点积)开始。首先,要解释的是,二维向量和这个二维向量在二维空间中对应的矩阵(线性变换)之间的关系。1x2矩阵与二维向量之间的联系:二维空间中的二维向量所对应的1

2017-11-21 19:05:43 450

原创 leetcode search for a range

Given a sorted array of integers, find the starting and ending position of a given target value. Your algorithm’s runtime complexity must be in the order of O(log n). If the target is not found in th

2017-11-18 12:57:33 229

原创 C++ map lower_bound() upper_bound()

1.lower_bound() 算法返回一个非递减序列[first, last)中的第一个大于等于值val的位置。 ForwardIter lower_bound(ForwardIter first, ForwardIter last,const _Tp& val)2.upper_bound() 算法返回一个非递减序列[first, last)中第一个大于val的位置。 Forward

2017-11-18 11:13:39 5616

空空如也

空空如也

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

TA关注的人

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