摘要:
方案一:find.-typef-name"*.c"-execcat{}\;|grep-v'^$'|wc-l 解释:find . -type f -name "*.c" 查找当前目录下所有以.c结尾的文件,如果不考虑文件类型,可以直接实用find . -type f即可。 -exec cat ... 阅读全文
摘要:
package leetcode.sort;import java.util.Arrays;/** * QuickSort * Created by blank on 2015-09-22 下午12:06. */public class QuickSort { static int[] arr... 阅读全文
摘要:
package leetcode.sort;import java.util.Arrays;import java.util.Random;/** * HeapSort * Created by blank on 15/8/12. */public class HeapSort { publi... 阅读全文
摘要:
package leetcode.sort;import java.util.Arrays;import java.util.Random;/** * Created by blank on 2015-09-22 上午11:42. */public class MergeSort { publ... 阅读全文
摘要:
Given a stringSand a stringT, count the number of distinct subsequences ofTinS.A subsequence of a string is a new string which is formed from the orig... 阅读全文
摘要:
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The longest ... 阅读全文
摘要:
Given a string of numbers and operators, return all possible results from computing all the different possible ways to group numbers and operators. Th... 阅读全文
摘要:
Given an arraynums, write a function to move all0's to the end of it while maintaining the relative order of the non-zero elements.For example, givenn... 阅读全文
摘要:
Given a positive integern, find the least number of perfect square numbers (for example,1, 4, 9, 16, ...) which sum ton.For example, givenn=12, return... 阅读全文
摘要:
After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. This t... 阅读全文