Questions tagged [hashcode]

Hashcode is a result of applying a hash function to data, usually an integer.

Filter by
Sorted by
Tagged with
14
votes
6answers
9k views

Calculate fingerprint for an object

I need to store serialized objects in a database and I want to avoid duplicates. In order to be able to tell wheter an object is already stored, I have to compare them somehow. My idea was to ...
9
votes
1answer
3k views

Duplicate files finder in C++

I've came across this question https://stackoverflow.com/questions/11760420/what-is-an-optimal-way-to-find-duplicate-files-in-c and there are two answers for it both the answers convey that it is bit ...
3
votes
1answer
1k views

Rabin Karp algorithm improvement for string contains A to Z only

I have made some improvement to Rabin Karp algorithm when the source and pattern only contain the characters from A to Z. The improvement is, I use base 26 for hashing (as there are total 26 ...
4
votes
2answers
3k views

Automatic IEqualityComparer<T>

There are APIs like the Except extension that require the IEqualityComparer<T> to work. I find it's too much work for such ...
8
votes
1answer
6k views

Implementation of the FNV-1a hash algorithm for 32- and 64-bit

Are there any improvements to these two classes which implement FNV-1a for hashing? Particularly, I'm looking for any reuse opportunities (possibly via a common abstract superclass derived from ...
5
votes
2answers
83 views

Iter 2: Reusable, robust c++ std::hash<mpz_class> for GMP's big integer type

This is the 2nd iteration of a code review. The 1st iteration (completed) is at Iter 1: Reusable, robust c++ std::hash<mpz_class> for GMP's big integer type 1. Goal My intention is to ...
5
votes
1answer
107 views

Iter 1: Reusable, robust c++ std::hash<mpz_class> for GMP's big integer type

This Q&A was iteration 1. Now there is Iter 2: Reusable, robust c++ std::hash<mpz_class> for GMP's big integer type 1. Goal My intention is to provide a fast hashing algorithm to hash ...
2
votes
2answers
1k views

Leetcode 49: Group Anagrams - Hash function design talk

problem statement Given an array of strings, group anagrams together. For example, given: ["eat", "tea", "tan", "ate", "nat", "bat"], ...
2
votes
2answers
88 views

Checking hash and passwords with a wordlist, more efficient

I have done a small code in which with a wordlist (out68.lst) I get the passwords from the hashes in the file 'shadow3'. ...