|
|
v*********t 发帖数: 7 | 3 我想到一个方法,各位大牛帮忙看下啊
扫描一遍数组 得到最小值min,令它的hashcode为 2,
再扫描一遍数组, 令a[i]的hashcode就是第(a[i]-min)个prime number 求积得出数组
的hashcode,比较两个数组的hashcode即可
我现在采用的做法是用primearray存了10000以内的prime number, 也可以用数学的方
法算(但这样的时间复杂度是n2?)。
public class ArrayEquality {
static boolean arrayequality(int a[], int b[])
{
int max=a[0];
int min=a[0];
long a_hashcode = 1;
long b_hashcode = 1;
int primearray[] ={2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61
,67,71,73,79,83,89,9... 阅读全帖 |
|
k********h 发帖数: 22 | 4 About Us:
ROBLOX is a leading user-generated gaming site that makes players the
architects of their own 3D worlds, drawing over one billion page views and
21 million in-game hours each month. The site is ranked #1 in the US for
total engagement time within the 8-14 year old segment, and is rapidly
growing in popularity amongst players aged 15+. Our vision is to become the
leader in user-generated gaming for all ages, around the world. On ROBLOX,
players use core building components to create ela... 阅读全帖 |
|
M*****8 发帖数: 17722 | 5 【 以下文字转载自 Military 讨论区 】
发信人: MB80528 (肥猫(Contrarian)[食MM而肥]), 信区: Military
标 题: Re: 2013年7月9日最新的1688个看跌的股票。
发信站: BBS 未名空间站 (Tue Jul 9 22:18:23 2013, 美东)
2013年7月9日最新的1688个看跌的股票。
多数到顶。墙街已深入插管,吸血在即。
排列依次为,号码,股票符号,收市价。
#0001, A , 44.6000
#0002, AA , 7.9010
#0003, AAGIY , 17.1600
#0004, AAMRQ , 4.7300
#0005, AAN , 28.9700
#0006, AAON , 24.7400
#0007, AAP , 83.2000
#0008, AAUKY , 9.5300
#0009, ABAX , 50.2800
#0010, AB... 阅读全帖 |
|
|
f**********e 发帖数: 288 | 7
<%@ Page language="C#" %>
<%@ Register Tagprefix="SharePoint"
Namespace="Microsoft.SharePoint.WebControls"
Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c" %>
<%@ Import Namespace="Microsoft.SharePoint" %>
|
|