题目描述:Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoint...
分类:
其他好文 时间:
2014-09-30 00:30:11
阅读次数:
211
前言在做开发的过程中难免需要给内核及下载的一些源码打补丁或者说是升级,所以我们学习在Linux下使用diff制作补丁以及如何使用patch打补丁显得尤为重要。diff与patch命令介绍1、 diff命令NAMEdiff - find differences between two filesSYN...
分类:
系统相关 时间:
2014-09-30 00:25:21
阅读次数:
343
题目描述: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 t...
分类:
其他好文 时间:
2014-09-30 00:24:31
阅读次数:
208
here are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O...
分类:
其他好文 时间:
2014-09-30 00:05:21
阅读次数:
274
Given a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list as2->1->4->3.Your algor...
分类:
其他好文 时间:
2014-09-29 23:36:31
阅读次数:
258
1、需求创建一个函数,接受一个数字(0-9),返回该数字相应的英文名称2、方法一// global scope...var names = ['zero','one','two','three','four','five','six','seven','eight','nine'];var digi...
分类:
其他好文 时间:
2014-09-29 18:05:41
阅读次数:
169
Description
A substring of a string T is defined as:
T( i, k)= TiTi+1... Ti+k-1, 1≤ i≤ i+k-1≤| T|.
Given two strings A, B and one integer K, we define S, a set of triples (i, j, k):
S = ...
分类:
其他好文 时间:
2014-09-29 14:38:51
阅读次数:
277
redis是一个强大的NoSQL数据库,相对于memcached,他提供了更丰富的数据类型,有string、hash、list、set、sorted set这几种类型;还支持数据持久化。光string类型,就比memcached功能更强大,提供了获取/设置子串、bit位等更灵活的操作,其他类型是me...
分类:
其他好文 时间:
2014-09-29 14:00:10
阅读次数:
192
1.数组中的each复制代码 var arr = [ "one", "two", "three", "four"]; $.each(arr, function(){ alert(this); }); //上面这个each输出的结果分别为:one,two,thr...
分类:
Web程序 时间:
2014-09-29 13:37:30
阅读次数:
237
O(1)空间复杂度实现n*n矩阵旋转90度,#include<iostream>
usingnamespacestd;
#defineARRAY_SIZE5
voidprint_two_array(inta[][ARRAY_SIZE]){
cout<<endl;
for(inti=0;i<ARRAY_SIZE;i++){
for(intj=0;j<ARRAY_SIZE;j++){
cout<<a[i][j]<<",";
..
分类:
其他好文 时间:
2014-09-29 03:43:57
阅读次数:
221