安装Git, 到项目目录下右击->Git Bash, 输入命令:find . -name
"*.cs" | xargs wc -l效果如下, 还是挺简便的.
分类:
其他好文 时间:
2014-06-13 14:02:58
阅读次数:
221
Implement an algorithm to print all valid (
properly opened and closed) combinations of n-pairs of parentheses.思路:比如 n = 3,
((())) 就是一个valid combinati...
分类:
其他好文 时间:
2014-06-11 13:19:00
阅读次数:
306
第零章:扯扯淡
出一个有意思的题目:用一个宏定义FIND求一个结构体struct里某个变量相对struc的编移量,如struct student{ int a;
//FIND(struct student,a) 等于0 char b; //FIND(struct st...
分类:
系统相关 时间:
2014-06-11 10:23:14
阅读次数:
361
原题地址:https://oj.leetcode.com/problems/edit-distance/题意:Given
two wordsword1andword2, find the minimum number of steps required to
convertword1toword2....
分类:
编程语言 时间:
2014-06-11 08:58:49
阅读次数:
293
1. 查找和排序查找:顺序查找、二分查找、二叉搜索树、哈希表顺序查找:T(n) = O(n)
std::find二分查找:T(n) = O(log n) std::binary_search std::lower_bound
std::upper_bound哈希表: T(n) = O...
分类:
其他好文 时间:
2014-06-11 07:45:31
阅读次数:
250
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without
repeating letters for "abcabcbb" is "abc", which the length is 3. Fo...
分类:
其他好文 时间:
2014-06-08 16:27:47
阅读次数:
231
Single NumberGiven an array of integers, every
element appearstwiceexcept for one. Find that single one.Note:Your algorithm
should have a linear runti...
分类:
其他好文 时间:
2014-06-07 23:44:39
阅读次数:
302
题目链接 Given a m x n grid filled with non-negative
numbers, find a path from top left to bottom right which minimizes the sum of
all numbers along its p...
分类:
其他好文 时间:
2014-06-07 21:59:08
阅读次数:
344
Given amxngrid filled with non-negative
numbers, find a path from top left to bottom right whichminimizesthe sum of all
numbers along its path.Note:Yo...
分类:
其他好文 时间:
2014-06-07 20:22:17
阅读次数:
264
题目大意:
三个操作。
1. 合并两个集合
2.把第一个元素放到第二个集合里
3.输出集合的数量和和。。
思路分析:
要用p记录这个元素所在集合编号,然后用编号建立并查集。
#include
#include
#include
#include
using namespace std;
typedef long long LL;
int set[111111...
分类:
其他好文 时间:
2014-06-07 12:52:40
阅读次数:
267