algorithm « hash « Java Collection Q&A

Home
Java Collection Q&A
1.algorithm
2.array
3.Array Byte
4.Array Char
5.Array Convert
6.Array Dimension
7.Array Integer
8.Array Object
9.Array String
10.ArrayList
11.collection
12.comparator
13.Development
14.Garbage Collection
15.Generic
16.hash
17.HashMap
18.HashTable
19.iterator
20.LinkedList
21.List
22.Map
23.queue
24.Set
25.Sort
26.tree
Java Collection Q&A » hash » algorithm 

1. Why does Java's hashCode() in String use 31 as a multiplier?    stackoverflow.com

In Java, the hash code for a String object is computed as s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1] using int arithmetic, where s[i] is the ith character of the string, ...

2. Is there a mature implementation of the FNV hashing algorithm in Java?    stackoverflow.com

I've seen the Fowler-Noll-Vo (FNV) recommended as a good choice for a fast hashing algorithm for use in our implementation of a consistent hashing system. Can't seem to locate a good ...

3. How to implement hash function in Java?    stackoverflow.com

I've used an array as hash table for hashing alogrithm with values:

int[] arr={4 , 5 , 64 ,432 };
and keys with consective integers in array as:
int keys[]={ 1 , 2 ...

4. Stack and Hash joint    stackoverflow.com

I'm trying to write a data structure which is a combination of Stack and HashSet with fast push/pop/membership (I'm looking for constant time operations). Think of Python's OrderedDict. I tried a few ...

5. How to properly define hash function for a list of objects?    stackoverflow.com

I have a data structure containing a list of objects, like this:

class A {
  private List<Object> list;
}
How to properly define a hash function for the list, assuming each element of ...

6. Hash : How does it work internally?    stackoverflow.com

This might sound as an very vague question upfront but it is not. I have gone through Hash Function description on wiki but it is not very helpful to ...

7. compute md5 hash of multi part data (multiple strings)    stackoverflow.com

I am trying to create a [single] md5 hash of multiple strings [in Java]. That is I want

md5(string1, string2, string3, ..., stringN)
Currently I am trying to concatenate all strings with some rarely ...

8. Hashing n-grams by cyclic polynomials - java implementation    stackoverflow.com

I'm solving some problem that involves Rabin–Karp string search algorithm. This algorithm requires rolling hash to be faster then naive search. This article describes how to implement rolling hash. ...

9. Java - Hash algorithms - Fastest implementations    stackoverflow.com

I want to know what is the best and fastest implementation of hash algorithms for Java especially MD5 and SHA-2 512 (SHA512) or 256. I want a function to get a ...

10. Need help in understanding Rolling Hash computation in constant time for Rabin-Karp Implementation    stackoverflow.com

I've been trying to implement Rabin-Karp algorithm in Java. I have hard time computing the rolling hash value in constant time. I've found one implementation at http://algs4.cs.princeton.edu/53substring/RabinKarp.java.html. Still I ...

11. Searching for a Fast Hash Algorithm    stackoverflow.com

I am searching for a fast hash algorithm. Actually, I am trying to build a hash table whose keys are URL's. I have used MD5 to hash the URL's, however it ...

12. Hash code generator in Java    stackoverflow.com

I'm looking for a hash code generator that will generate a unique hash from these characters: [a-zA-Z0-9] and that generates two-character hash like: aZ or g2 That is less likely to collide; ...

13. Which hash algorithm can be used for duplicate content verification?    stackoverflow.com

I have an xml file, where I need to determine if it is a duplicate or not. I will either hash the entire xml file, or specific xml nodes in the xml ...

14. Make a Sim Hash (Locality Sensitive Hashing) Algorithm more accurate?    stackoverflow.com

I have 'records' (basically CSV strings) of two names and and one address. I need to find records that are similar to each other: basically the names and address portions all ...

15. HMAC-MD5 hashing algorithm    coderanch.com

Hello I'm semi successfull at finally creating this algorithm and running it againts the variables I need to. But it doesn't seem to be a true HMAC-MD5 hash... The successfull hash I create with an ASP script that works and plugs into my gateway looks like this... f81633aec015f23fbfd57bec77529c31 The one I create with the following code looks like this and has ...

16. hashcode algorithms..    coderanch.com

17. Hashing Algorithm - HashMap/hashTable    coderanch.com

It uses whatever algorithm the writers of your JRE chose to do the hashing. If you're interested in Sun's JRE then by all means look at the source code which came with your Java JDK download (in the src.zip file). It's possible that other JRE's may do it differently, although most of them are based on Sun's code. And no, if ...

18. Horner's Hash Algorithm    forums.oracle.com

19. Java String hashCode algorithm    forums.oracle.com

java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.