static final int DEFAULT_INITIAL_CAPACITY = 16;// 默认初始容量为16,必须为2的幂 static final int MAXIMUM_CAPACITY = 1 << 30;// 最大容量为2的30次方 static final float DEFAU ...
分类:
其他好文 时间:
2017-07-25 22:40:50
阅读次数:
162
代码: class Solution { public: /** * @param prices: Given an integer array * @return: Maximum profit */ int maxProfit(vector<int> &price) { int re = 0; ...
分类:
其他好文 时间:
2017-07-25 19:43:25
阅读次数:
94
Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example, given the array [-2,1,-3,4,-1,2, ...
分类:
其他好文 时间:
2017-07-25 19:30:46
阅读次数:
155
Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000. Example: Example: Similar Question ...
分类:
其他好文 时间:
2017-07-25 14:21:47
阅读次数:
130
Problem statement You are given n pairs of numbers. In every pair, the first number is always smaller than the second number. Now, we define a pair (c ...
分类:
其他好文 时间:
2017-07-25 10:34:27
阅读次数:
225
<!DOCTYPE html><html><head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,u ...
分类:
其他好文 时间:
2017-07-25 10:30:57
阅读次数:
7110
1.创建maven项目 pom文件: 2.编写wordcound 3.在src下面创建NativeIO 创建package:org.apache.hadoop.io.nativeio 创建类:NativeIO 4.确保hadoop运行正常,将文件上传到hdfs上 hadoop fs -mkdir - ...
分类:
其他好文 时间:
2017-07-25 00:50:27
阅读次数:
331
目录(?)[+] 目录(?)[+] 文件概念 文件是记录在外存上得相关信息的具有名称的集合。其具有连续的逻辑地址空间 通常,文件表示数据和程序。 数据文件可以包括,数字、字符、字符串或二进制。文件可以是自由形式,如文本文件,也可以具有严格的格式。 文件必须具有可以长期信息存储的性质、必须能够保存大容 ...
分类:
其他好文 时间:
2017-07-24 20:22:45
阅读次数:
262
题目原文: Stack with max. Create a data structure that efficiently supports the stack operations (push and pop) and also a return-the-maximum operation. A ...
分类:
其他好文 时间:
2017-07-24 19:16:47
阅读次数:
181
错误:DjangoRuntimeError:maximumrecursiondepthexceeded原因出自Python\Lib\fuctools.py把convert={‘__lt__‘:[(‘__gt__‘,lambdaself,other:other<self),
(‘__le__‘,lambdaself,other:notother<self),
(‘__ge__‘,lambdaself,other:notself<other)],‘__le__‘:[(‘__ge_..