Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex ...
分类:
其他好文 时间:
2016-06-22 23:29:26
阅读次数:
175
题目连接 https://leetcode.com/problems/4sum/ 4Sum Description Given an array $S$ of n integers, are there elements $a, b, c,$ and d in $S$ such that $a + ...
分类:
其他好文 时间:
2016-06-22 23:18:09
阅读次数:
133
Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], Return: Note: All inputs will be i ...
分类:
其他好文 时间:
2016-06-22 22:00:17
阅读次数:
139
http://codeforces.com/problemset/status 题意:给一个数组,和一个坏质数集合,可以无数次地让1到i这些所有数字除以他们的gcd,然后要求Σf(a[i])的最大值,其中 f(x)=f(x/p)+1,p为x的最小质数,且p不为坏质数 f(x/p)-1 ,p为x的最小 ...
分类:
其他好文 时间:
2016-06-22 21:53:22
阅读次数:
223
Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. You may assum ...
分类:
编程语言 时间:
2016-06-22 18:59:55
阅读次数:
200
Write a function to find the longest common prefix string amongst an array of strings 题目:找vector中最长公共前缀, 思路:模拟比较的过程,我们可以看到这些. 按照数组中的第一个字符串开始进行比较, 对第一个 ...
分类:
其他好文 时间:
2016-06-22 18:51:52
阅读次数:
150
1.数组的创建 var arrayObj = new Array();//创建一个默认数组,长度是0 var arrayObj = new Array(size);//创建一个size长度的数组,注意Array的长度是可变的,所以不是上限,是长度 var arrayObj = new Array(i ...
分类:
编程语言 时间:
2016-06-22 18:44:10
阅读次数:
210
$ch = curl_init(); $curl_opt = array(CURLOPT_URL, 'http://www.example.com/backend.php', CURLOPT_RETURNTRANSFER, 1, CURLOPT_TIMEOUT, 1,); curl_setopt_a ...
分类:
编程语言 时间:
2016-06-22 12:24:04
阅读次数:
197
new array()[] []表示数组new object(){} {}表示对象 JavaScript 对象 对象由花括号分隔。在括号内部,对象的属性以名称和值对的形式 (name : value) 来定义。属性由逗号分隔: 上面例子中的对象 (person) 有三个属性:firstname、la ...
分类:
Web程序 时间:
2016-06-22 10:41:14
阅读次数:
216
2,Array (1)How to implement Java ArrayList public class ArrayList { private int capacity; private int size; private int[] data; public ArrayList(int c ...
分类:
其他好文 时间:
2016-06-22 10:31:17
阅读次数:
200