码迷,mamicode.com
首页 > 其他好文
162.Find Peak Element(二分查找)
A peak element is an element that is greater than its neighbors. Given an input array where num[i] ≠ num[i+1], find a peak element and return its index. The array may contain multiple peaks, in that...
分类:其他好文   时间:2015-02-12 22:53:43    阅读次数:207
8.String to Integer (atoi)
Implement atoi to convert a string to an integer. Hint: Carefully consider allpossible input cases. If you want a challenge, please do not see below and askyourself what are the possible input cases....
分类:其他好文   时间:2015-02-12 22:52:32    阅读次数:197
26.Remove Duplicates from Sorted Array
Given a sorted array, remove the duplicates in place such that eachelement appear only once and return the new length. Do not allocate extra space for another array, you must do this in placewith con...
分类:其他好文   时间:2015-02-12 22:52:00    阅读次数:143
121.Best Time to Buy and Sell Stock
Say you have an array for which the ith element isthe price of a given stock on day i. If you were only permitted to complete at most one transaction (ie, buyone and sell one share of the stock), des...
分类:其他好文   时间:2015-02-12 22:51:58    阅读次数:178
48.Rotate Image
You are given an n x n 2D matrixrepresenting an image. Rotate the image by 90 degrees (clockwise). Follow up: Could you do this in-place? HideTags  Array #pragma once #include #include using n...
分类:其他好文   时间:2015-02-12 22:52:50    阅读次数:157
学术休假期 项目2-猴子选大王 (动态链表)
链表关系好混乱 /* *Copyright (c)2014,烟台大学计算机与控制工程学院 *All rights reserved. *文件名称:猴子选大王.cpp *作 者:冷基栋 *完成日期:2015年2月12日 *版 本 号:v1.0 * *问题描述:一群猴子,编号是1,2,3 ...m,这群猴子(m个)按照1-m的顺序围坐一圈。从第1只开始数,每数到第n个,该猴子就要离开此圈,这样...
分类:其他好文   时间:2015-02-12 22:52:07    阅读次数:230
不要把自己定位的太高
记得,不要太看得起自己,其实自己没有什么了不起的。这几天发生了很多,别人也和我说了很多,我自己其实也有体会,自己也有些触动,到现在我才明白,我就是对自己的定位太高了,觉得自己好像很行的样子,其实呢,自己是不行的,就像在编程上一样,记得在学校的时候,XX就老说我很好,相比新生而言,说的次数多了,也就对我潜移默化的产生了些许的影响,再加上我在班上是比较优秀的,在很多方面,尤其是学习方面,我。。。。。。...
分类:其他好文   时间:2015-02-12 22:52:07    阅读次数:171
poj1222 EXTENDED LIGHTS OUT
EXTENDED LIGHTS OUT Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 7202   Accepted: 4718 Description In an extended version of the game Lights Out, is a p...
分类:其他好文   时间:2015-02-12 22:51:07    阅读次数:254
重构笔记——隐藏“委托关系”
本文是在学习中的总结,欢迎转载但请注明出处:http://write.blog.csdn.net/postedit/43769929         在上一篇文章中介绍了“将类内联化”。本文将介绍“隐藏委托关系”这种重构手法。         下面让我们来学习这种重构手法吧。 开门见山         发现:客户通过一个委托关系来调用另一个对象。         解决:在服务类上建立客户所需的所有函数,用以隐藏委托关系。...
分类:其他好文   时间:2015-02-12 22:51:35    阅读次数:258
HDU 1253 胜利大逃亡
三维广搜水题...
分类:其他好文   时间:2015-02-12 22:51:47    阅读次数:187
杭电ACM 二 数学求模
Font Size: ← → Problem Description A number sequence is defined as follows: f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7. Given A, B, and n, you are to calculate the value of...
分类:其他好文   时间:2015-02-12 22:50:53    阅读次数:178
Balanced Lineup(线段树之区间查找最大最小值)
传送门 线段树的区间查找最大最小值模板. 裸的线段树 #include #include #include #include #include #include #include #include #include #define ls u << 1 #define rs u << 1 | 1 #define lson l, mid, u << 1 #de...
分类:其他好文   时间:2015-02-12 22:51:10    阅读次数:165
学习源代码内核一定要独立思考、勤于实践
今天给两位大二的学生讲解了某开源数据库源代码改造的思路。 非常失望。以他们的基础,按照原计划现在他们应该在调试代码了。但是现实让我大跌眼镜。 天道酬勤,只有坚韧勤奋才能成就超越常人之实力。 望珍惜自己的青春和才华。...
分类:其他好文   时间:2015-02-12 22:48:46    阅读次数:184
CSDN终于改进了编辑器啦!!!
今天写博客,发现了CSDN可以使用MarkDown编辑器啦,期待已久...
分类:其他好文   时间:2015-02-12 22:49:00    阅读次数:141
13.2.1 访问世界银行的数据
13.2.1 访问世界银行的数据我们在本章使用的数据源,是由世界银行提供的服务,它是为发展中国家提供资金和知识的国际组织。作为其工作的一部分,它需要识别哪种类型的支持最有效,确定需求在哪里,评估对发展中国家的经济,生活质量,环境是否产生了影响。世界银行有一组数据,称为世界发展指标(World Development Indicators),包含了许多国家的信息,而且数据在线可用。...
分类:其他好文   时间:2015-02-12 22:50:00    阅读次数:170
Hexo博客迁移到Coding
Coding是一个面向开发者的云端开发平台,目前提供代码托管,运行空间,质量控制,项目管理等功能。Coding提供社会化协作功能,包含了社交元素,为开发者提供技术讨论和协作平台。一、创建项目注:选择公开点击创建之后 获取页面HTTPS或SSH地址二、Clone项目到本地$ git clone https://coding.net/itmyhome/blog.git blog三、推送代码如果已有he...
分类:其他好文   时间:2015-02-12 22:49:00    阅读次数:413
NB的正则表达式
谁猜出这个表达式的作用?有奖。 string pattern("([^?=&]+)(=([^&]*))?"); 其实,它是用来取URI中的参数的: 型如: url & key1 = value1 & key2 = value2 通过boost::regex::search(pattern, src),就能取出如下的key和value: &key=valu...
分类:其他好文   时间:2015-02-12 22:47:27    阅读次数:219
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!