Given a string, find the length of the longest substring T that contains at most 2 distinct characters. For example, Given s = “eceba”, T is "ece" whi ...
分类:
其他好文 时间:
2016-08-19 13:12:56
阅读次数:
135
Distance in the Tree Time limit: 1.0 secondMemory limit: 64 MB A weighted tree is given. You must find the distance between two given nodes. Input The ...
分类:
其他好文 时间:
2016-08-19 13:12:48
阅读次数:
230
本代码来源:http://www.imooc.com/code/4703 叶子钗mooc 遍历父节点: 遍历同胞节点: 遍历后代 find() 使用的是sizzle 引擎 不过在支持querySelectAll() 的浏览器中可以 ...
分类:
Web程序 时间:
2016-08-19 13:05:07
阅读次数:
227
Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may comple ...
分类:
其他好文 时间:
2016-08-19 12:40:00
阅读次数:
175
Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix. Note that it is th ...
分类:
其他好文 时间:
2016-08-19 09:53:14
阅读次数:
127
Given n nodes labeled from 0 to n - 1 and a list of undirected edges (each edge is a pair of nodes), write a function to find the number of connected ...
分类:
其他好文 时间:
2016-08-19 07:29:23
阅读次数:
115
find查找方式:1、文件名:-name-iname(忽略大小写)*(代表任意一个字符)?(代表任意一个字符)2、文件大小:-size+--user-group-amin访问时间-cmin文件属性-mmin修改内容3、文件类型-typef文件d目录l链接-a同时候两个条件成立-o只其中一个条件-exec/-ok(询问){}\;
分类:
其他好文 时间:
2016-08-19 06:25:57
阅读次数:
156
推荐一款windows软件:everything,可快速搜索到文件 1.文件搜索命令:find 不要在服务器使用高峰期用find,find范围尽量小 find [范围] [匹配条件] 范例: find /etc -name init :在目录/etc下查找文件init ,精准搜索,若要模糊搜索用*匹 ...
分类:
系统相关 时间:
2016-08-19 06:16:35
阅读次数:
200
题目描述: Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The fu ...
分类:
编程语言 时间:
2016-08-19 06:16:14
阅读次数:
203
我用的linux操作系统类别是CentOS-6.5 首先在虚拟机选项的设置里设置CD/DVD选项其中勾选Connect at power on选项 在连接中选择Use ISO image file:即选择镜像文件的目录地址 然后在/root目录下输入命令:mount /mnt/cdrom 输出错误为 ...
分类:
其他好文 时间:
2016-08-19 00:56:33
阅读次数:
196