统计指定后缀名的文件总个数命令:find . -name *.cpp | wc -l统计一个目录下代码总行数以及单个文件行数:find . -name *.h | xargs wc -llinux统计文件夹中文件数目第一种方法:ls -l|grep “^-”|wc -lls -l 长列表输出该目录下...
分类:
系统相关 时间:
2015-07-19 14:46:26
阅读次数:
200
题目:
Given n non-negative integers
representing the histogram's bar height where the width of each bar is 1, find the area of largest rectangle in the histogram.
Above is a histogram where wi...
分类:
编程语言 时间:
2015-07-19 13:35:37
阅读次数:
128
#235 Lowest Common Ancestor of a Binary Search TreeGiven a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the B...
分类:
其他好文 时间:
2015-07-19 13:22:08
阅读次数:
90
2.2 Implement an algorithm to find the kth to last element of a singly linked list.这道题让我们求链表中倒数第k个元素,LeetCode中相类似的题目有Kth Largest Element in an Array 数...
分类:
其他好文 时间:
2015-07-19 13:21:05
阅读次数:
104
Intersection of Two Linked Lists : https://leetcode.com/problems/intersection-of-two-linked-lists/Write a program to find the node at which the intersection of two singly linked lists begins.For exampl...
分类:
其他好文 时间:
2015-07-19 10:22:22
阅读次数:
140
Given a stringS, find the longest palindromic substring inS. You may assume that the maximum length ofSis 1000, and there exists one unique longest pa...
分类:
其他好文 时间:
2015-07-19 10:00:25
阅读次数:
125
Lowest Common Ancestor of a Binary TreeTotal Accepted:4228Total Submissions:15884My SubmissionsQuestionSolutionGiven a binary tree, find the lowest co...
分类:
其他好文 时间:
2015-07-19 09:57:53
阅读次数:
87
强硬的文档替换更新操作db.[documentName].update({查询器},{修改器})2.主键冲突的时候会报错并停止更新操作,当强硬替换的文档和已有的文档ID冲突的时候,系统会报错例子:>db.userInfo.find()
{"_id":2,"name":"xiaoyou"}
{"_id":3,"name":"yy"}
>db.userInfo.update({..
分类:
数据库 时间:
2015-07-19 06:40:39
阅读次数:
232
There are two sorted arraysnums1andnums2of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should...
分类:
其他好文 时间:
2015-07-18 22:41:08
阅读次数:
120
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters fo...
分类:
其他好文 时间:
2015-07-18 21:14:22
阅读次数:
120