You are given a string,S, and a list of
words,L, that are all of the same length. Find all starting indices of
substring(s) in S that is a concatenati...
分类:
其他好文 时间:
2014-05-28 04:03:54
阅读次数:
240
题目链接题意: find the maximum positive difference
between the price on the ith day and the jth day附上代码: 1 class Solution { 2
public: 3 int maxProfit(ve...
分类:
其他好文 时间:
2014-05-28 03:49:45
阅读次数:
307
文件及目录管理文件管理不外乎文件或目录的创建、删除、查询、移动,有mkdir/rm/mv文件查询是重点,用find来进行查询;find的参数丰富,也非常强大;查看文件内容是个大的话题,文本的处理有太多的工具供我们使用,在本章中只是点到即止,后面会有专门的一章来介绍文本的处理工具;有时候,需要给文件创...
分类:
系统相关 时间:
2014-05-27 17:45:40
阅读次数:
435
Element.firstChild ?,是的,这是第一种方法,当然,通常来说支持 W3C
规范的浏览器,如 Firefox 等取到的应该是 TEXT_NODE。很早之前,或者说现在最流行的方法可能是
分类:
其他好文 时间:
2014-05-27 17:41:53
阅读次数:
520
Given an array of integers, find two numbers such
that they add up to a specific target number.The function twoSum should return
indices of the two nu...
分类:
其他好文 时间:
2014-05-26 19:50:39
阅读次数:
314
1.php str_replace函数:str_replace()
函数使用一个字符串替换字符串中的另一些字符。str_replace(find,replace,string,count)find:必须,表示被查找的值replace:必须,替换别查找的值的值string:必须,被查找的字符串coun...
分类:
Web程序 时间:
2014-05-26 19:38:05
阅读次数:
292
出题:并查集(Union-Find
Sets)分析:一种树型数据结构,用于处理不相交集合(Disjoint
Sets)的合并以及查询;一开始让所有元素独立成树,也就是只有根节点的树;然后根据需要将关联的元素(树)进行合并;合并的方式仅仅是将一棵树最原始的节点的父亲索引指向另一棵树;优化:加入一个ra...
分类:
其他好文 时间:
2014-05-26 18:48:46
阅读次数:
290
Given an array of non-negative integers, you
are initially positioned at the first index of the array.Each element in the
array represents your maximu...
分类:
其他好文 时间:
2014-05-26 18:46:20
阅读次数:
251
A Stack is a data-structure that You can only add
an element to the top of the Stack, andYou can only read or remove an element
also from the top.Plea...
分类:
编程语言 时间:
2014-05-26 17:10:21
阅读次数:
540
Element类型Element类型用于表现XML或HTML元素,提供对元素标签名、子节点及特性的访问,它具有以下特征nodeType的值为1;nodeName的值为元素的标签名;nodeValue的值为null;parentNode可能是Document或Element;要访问元素的标签名可以使用...
分类:
编程语言 时间:
2014-05-26 17:03:25
阅读次数:
520