function uniqArray(arr) { // your implement for(var i=0;i<arr.length;i++) for(var j=i+1;j<arr.length;j++) { if(arr[i]===arr[j]){ ...
分类:
编程语言 时间:
2015-05-12 22:38:55
阅读次数:
129
【题目】
Given an array and a value, remove all instances of that value in place and return the new length.
The order of elements can be changed. It doesn't matter what you leave beyond the new le...
分类:
其他好文 时间:
2015-05-12 15:55:06
阅读次数:
133
import?java.util.HashMap;
import?java.util.HashSet;
import?java.util.Iterator;
import?java.util.Map;
import?java.util.Set;
public?class?Test?{
?public?static?void?main(String[]?args)?...
分类:
其他好文 时间:
2015-05-12 13:49:28
阅读次数:
114
【题目】
Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.
Do not allocate extra space for another array, you must do this in ...
分类:
其他好文 时间:
2015-05-12 11:24:49
阅读次数:
92
前几天去吃葫芦头的路上,大飞哥给详细的讲解了他在比较文本相似度实验时对Google的simhash方法高效的惊叹,回来特意去找了原文去拜读。Simhash传统IR领域内文本相似度比较所采用的经典方法是文本相似度的向量夹角余弦,其主要思想是根据一个文章中出现词的词频构成一个向量,然后计算两篇文章对应向...
分类:
Web程序 时间:
2015-05-10 20:15:12
阅读次数:
126
题目:LINK题意:求满足题目要求的x序列的种类数。能够发现符合条件的序列去重后是一个0, 1, ..., k的连续序列(k满足k*(k+1)/2 #include #include #include #include #include #include #include #include #inc...
分类:
其他好文 时间:
2015-05-09 18:55:11
阅读次数:
112
这是一篇转自汤姆大叔的文章:http://www.cnblogs.com/TomXu/archive/2011/12/15/2288411.html前言网上还没用发现有人对命名函数表达式进去重复深入的讨论,正因为如此,网上出现了各种各样的误解,本文将从原理和实践两个方面来探讨JavaScript关于...
分类:
编程语言 时间:
2015-05-07 14:14:26
阅读次数:
123
这篇不想再去重复一个软件需求分析员的知识体系结构,而是挑重点来谈下成为一个合格的软件需求分析人员的关键点。我原来对软件需求的定义或描述更多是偏于对现实世界的定义,而对软件架构的描述为现实到实现之间的第一层抽象。在这里纠正一下即:用户需求是对现实世界的定义,而 软件系统需求是现实到实现的第一层抽象,即...
分类:
其他好文 时间:
2015-05-07 14:01:44
阅读次数:
108
//去重边 1 #include 2 #include 3 #include 4 #define maxint 999999999 5 using namespace std; 6 int min(int x,int y) 7 { 8 return x q; 39 ...
分类:
其他好文 时间:
2015-05-06 22:48:06
阅读次数:
197
题目:两个有序数组a和b,混合之,放在另一个数组c中,使得c也是有序数组(升序),去除重复的项。
虽然觉得不是很简便,但代码如下:
int merge_array (int *a , int *b, int *c, int n1, int n2)
{
if (n1 < 0 || n2 < 0) {
return -1;
}
int i = 0;
...
分类:
编程语言 时间:
2015-05-06 01:28:12
阅读次数:
177