题目链接Problem discriptionGiven two sorted integer
arrays A and B, merge B into A as one sorted array.Note:You may assume that A
has enough space (size t...
分类:
其他好文 时间:
2014-06-16 11:12:36
阅读次数:
192
Given an array of strings, return all groups of
strings that are anagrams.Note: All inputs will be in lower-case.题解:
判断字符串是否为回文构词法生成的。找出所有由同一回文构词法生成的字...
分类:
其他好文 时间:
2014-06-12 13:51:32
阅读次数:
200
1 // Xml 转 数组, 包括根键,忽略空元素和属性,尚有重大错误 2 function
xml_to_array( $xml ) 3 { 4 $reg = "/]*?>([\\x00-\\xFF]*?)/"; 5
if(preg_match_all($reg, $xml, $...
分类:
Web程序 时间:
2014-06-12 13:16:05
阅读次数:
260
一、boost库分类:(1)不需要编译库:any、array、asio、conversion、crc、bind/mem_fn、enable_if、function、lambda、mpl、smart_ptr...(2)需要编译的库:date_time、filesystem、function_types...
原先就看过这道题,觉得很复杂。不知道为什么今天一看觉得好水啊……难道这就是并查集的启发式合并?数组d【i】表示i到其父节点的距离,即中间隔了多少船舰。数组sum【i】记录以i为根的集合总共有多少个元素,将新节点插入的时候距离设为sum【i】就好了。代码:
1 var fa,d,sum:array[....
分类:
其他好文 时间:
2014-06-12 09:45:29
阅读次数:
145