Two SumGiven 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...
分类:
其他好文 时间:
2014-05-15 10:48:59
阅读次数:
322
LeetCode-001 Two Sum
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 two numbers such that they add up to the target, where index1 must be less than index2...
分类:
其他好文 时间:
2014-05-15 04:34:50
阅读次数:
293
Single Number II
Total Accepted: 14472 Total
Submissions: 44420My Submissions
Given an array of integers, every element appears three times except for one. Find that single one.
Note:
Y...
分类:
其他好文 时间:
2014-05-15 01:23:42
阅读次数:
273
[ 问题: ]
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 two numbers such that they add up to the ta...
分类:
其他好文 时间:
2014-05-15 00:04:39
阅读次数:
377
鸽巢原理: n+1个鸽子放入n个窝中,至少有一个窝含有两只鸽子 Find a
multipleTime Limit:1000MSMemory Limit:65536KTotal
Submissions:5590Accepted:2434Special JudgeDes...
分类:
其他好文 时间:
2014-05-14 23:00:02
阅读次数:
375
HOWTO Use Python in the web — Python v3.0.1
documentationmod_python?People coming from PHP often find it hard to grasp how
to use Python in the web. T...
分类:
编程语言 时间:
2014-05-14 22:31:33
阅读次数:
401
【题目】
Implement regular expression matching with support for '.' and '*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The function prototype shoul...
分类:
其他好文 时间:
2014-05-14 21:36:52
阅读次数:
348
题意:移除数组中出现的给定元素,并返回移除元素数组长度。要求在数组上操作
思路:遍历数组,将除给定元素外的其他元素赋值给“新数组”,不过这个“新数组”还是在原来的“旧数组”的内存空间
因为遍历旧数组的下标总大于等于新数组的下标,所以赋值并不会影响到还没有遍历到的元素
复杂度:时间O(n), 空间O(1)...
分类:
其他好文 时间:
2014-05-14 21:35:52
阅读次数:
257
Total Accepted: 8400 Total Submissions: 38235 My Submissions
Say you have an array for which the ith element is the price of a given stock on day i.
Design an algorithm to find the maximum profi...
分类:
其他好文 时间:
2014-05-14 19:39:53
阅读次数:
275
SQLServer一般默认的端口为1433,但有时会遇到无法连接端口1433的问题,检查端口1433是否启用的方法为:开始–>输入cmd–>回车–>telnetlocalhost1433->回车出现黑屏,表示本机连接端口1433成功。或者开始–>输入cmd–>回车–>netstat-an|find"1433"->..
分类:
数据库 时间:
2014-05-14 18:20:51
阅读次数:
409