自定义博客皮肤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)
  • 收藏
  • 关注

原创 LeetCode-001 Two Sum

给定一个整数数组,返回这两个数字的索引,使它们合计成一个特定的目标。您可能会认为每个输入都只有一个解决方案,并且您可能不会使用相同的元素两次。例:鉴于NUMS = [2,7,11,15],目标= 9, 因为NUMS [ 0 ] + NUMS [ 1 ] = 2 + 7 = 9, 返回[ 0,1 ]。Given an array of integers, return indices of the...

2018-03-22 18:25:46 190

转载 栈在O(1)时间内求min值

实现一个栈Stack,要求实现Push(出栈)、Pop(入栈)、Min(返回最小值的操作)的时间复杂度为O(1)思路:1:在stack的数据结构中加两个个字段,如 typedef struct {        int data[MAX];   // 存储栈中的所有数       int top;   // 存储栈顶元素在data数组中的位置       int min;  // 最小值     ...

2018-03-13 21:46:18 212

原创 读书有疑

开篇文章回顾我的学习记录 目前正在艹 《C primer plus》 《android 应用程序开发与典型案例》《算法竞赛入门指南》《算法导论》这四本书 2015年9月19日 一个月时间争取搞完这四本。

2015-09-19 10:39:48 174

原创 健忘症的知识碎片保存

#include

2015-09-17 17:07:32 149

原创 ACM-STEP Rank

Rank Problem Description Jackson wants to know his rank in the class. The professor has posted a list of student numbers and marks. Compute Jackson’s rank in class; that is, if he has

2015-09-17 16:44:42 197

原创 ACM-Saving HDU

网上的例程 #include #include using namespace std; struct TS {          int pi;  //单位体积的价值          int mi; //总有体积 }; bool cmp(TS a,TS b) {          return a.pi>b.pi; }

2015-09-15 10:47:18 247

空空如也

空空如也

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

TA关注的人

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