Binary search. Please not data types and some details.class Solution {public: /** *@param L: Given n pieces of wood with length L[i] *@para...
分类:
其他好文 时间:
2015-10-07 12:12:05
阅读次数:
184
** * 复制单个文件 * @param oldPath String 原文件路径 如:c:/fqf.txt * @param newPath String 复制后路径 如:f:/fqf.txt * @return boolean */ public void copyFile(String old...
分类:
编程语言 时间:
2015-10-06 19:25:22
阅读次数:
130
Idea is the same: climbing up the hill along one edge (Greedy)! Visualize it in your mind!class Solution {public: /** * @param A: An integer ma...
分类:
其他好文 时间:
2015-10-06 08:05:31
阅读次数:
150
Not hard to find a solution, but there are several corner cases.class Solution {public: /** * @param root: The root of the binary search tree. ...
分类:
其他好文 时间:
2015-10-05 07:02:21
阅读次数:
259
Greedy: remove earliest down-edge: like "54", "97".class Solution {public: /** *@param A: A positive integer which has N digits, A is a string....
分类:
其他好文 时间:
2015-10-05 01:55:06
阅读次数:
215
/** * 题意:将0挪到末尾,并且不改数组中原有元素的顺序 * 解析:找到0元素,然后寻找其后面非0的元素,进行交换位置 * @param {number[]} nums * @return {void} Do not return anything, modify nums in-place i...
分类:
其他好文 时间:
2015-10-04 22:17:09
阅读次数:
276
/*** 单例模式的使用** 单例创建用户服务对象 没必要给每个用户都创建一个* * 单例 :1 构造方法私有化 2 创建一个私有的静态变量 3 公共的静态方法 当做入口* * @param user*//** 第一种单例模式*/// 问题 : 预先加载,没有手动实例化变量的时候 已经实例化了变量/...
分类:
编程语言 时间:
2015-10-04 20:49:37
阅读次数:
172
Not hard to think of a solution. But the key is all details.class Solution {public: /** *@param n: Given a decimal number that is passed in as ...
分类:
其他好文 时间:
2015-10-04 12:20:18
阅读次数:
257
从Onethink代码里摘出来的 /**
?*?获取客户端IP地址
?*?@param?integer?$type?返回类型?0?返回IP地址?1?返回IPV4地址数字
?*?@return?mixed
?*/
function?get_client_ip($type?=?0)?{
????...
分类:
Web程序 时间:
2015-10-03 23:17:22
阅读次数:
349
高德地图导航sdk的路径规划获取行程信息主要用到AMapNaviManager这个类然后调下面的方法/*!@brief 带起点的驾车路径计算@param startPoints 起点坐标。支持多个起点,起点列表的尾点为实际导航起点,其他坐标点为辅助信息,带有方向性,可有效避免算路到马路的另一侧。@p...
分类:
其他好文 时间:
2015-10-02 16:01:32
阅读次数:
282