先介绍下本题的题意:在一个字符串组成的数组words中,找出max{Length(words[i]) * Length(words[j])},其中words[i]和words[j]中没有相同的字母,在这里字符串由小写字母a-z组成的。对于这道题目我们统计下words[i]的小写字母a-z是否存在,然...
分类:
其他好文 时间:
2016-01-24 21:05:20
阅读次数:
199
Question:Given an integer array with no duplicates. A max tree building on this array is defined as follow:The root is the maximum number in the array...
分类:
其他好文 时间:
2016-01-22 17:37:37
阅读次数:
154
C++11 feature version#include #include #include using namespace std;const unsigned maximum = 10000;unsigned loop(unsigned n){ unsigned i = 1; wh...
分类:
其他好文 时间:
2016-01-22 17:29:43
阅读次数:
125
Windows版本因为文件访问句柄数被限制为1024了,当访问量大时就会无法响应。会有如下错误提示:maximum number of descriptors supported by select() is 1024修改参数worker_connections可以解决此限制,还有其它很多说修改wo...
分类:
Windows程序 时间:
2016-01-22 14:21:36
阅读次数:
3132
原题链接在这里:https://leetcode.com/problems/maximum-product-of-word-lengths/用mark[i]数组来标记 words[i]都含有哪些字母,假若有个'c', 就在第三位上有个1.通过mark[i] & mark[j] 是否为0来确定是否有相...
分类:
其他好文 时间:
2016-01-22 13:48:44
阅读次数:
157
Iteration:public class Solution { public int maxSubArray(int[] nums) { int start = 0, end = nums.length-1; //return sumSubArray(nums,...
分类:
其他好文 时间:
2016-01-19 08:00:26
阅读次数:
141
Given a string arraywords, find the maximum value oflength(word[i]) * length(word[j])where the two words do not share common letters. You may assume t...
分类:
其他好文 时间:
2016-01-18 06:55:13
阅读次数:
166
题目:Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.思路:固定一点,计算每一条经过这个店的直线斜率,用一个hashmap记录。记录下最多的斜率个数。对每...
分类:
其他好文 时间:
2016-01-17 07:33:47
阅读次数:
134
近期在做项目的过程中,使用oracle时碰到了如下两个异常:ORA-12519, TNS:no appropriate service handler found;ORA-00020:maximum number of processes (150) exceeded。下文我们就来看一下产生此问题的...
分类:
其他好文 时间:
2016-01-16 07:32:44
阅读次数:
252