All Questions
9 questions
1
vote
1
answer
331
views
InternedString as alternative to regular String
I need to use large strings as a dictionary keys, and I want to optimize the repetitive GetHashCode() and Equals() calls in it.
...
5
votes
4
answers
2k
views
Fast case-insensitive hash-code for specific codes
I'm trying to fix another bottleneck identified with a profiler (dotTrace). This time it's a case insensitive hash-code.
Currently I'm using the ...
2
votes
2
answers
2k
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
1
answer
397
views
Minimal length of substring that forms cyclic string
There is a known problem stated as "Cyclic string":
A string S has been recorded many times, and then from the resulting line took a substring, and give to you.Your task is to determine the ...
3
votes
4
answers
2k
views
Optimizing Java SHA-512 String-to-Hash Generator
In an attempt to learn Java and SHA-2 I created a very simple String-to-SHA512 generator. Here is the code:
...
11
votes
2
answers
3k
views
One-way hash using ASCII
Assume the built-in function Ascii(c), where c is a one character
string, will return an integer containing the ASCII value of ...
3
votes
1
answer
8k
views
Hash function for strings
Implementation of a hash function in java, haven't got round to dealing with collisions yet.
I tried to use good code, refactored, descriptive variable names, nice syntax.
My code must be efficient ...
3
votes
3
answers
401
views
A hash-signature-type which tests on comparing against normal strings
I decided to throw this together today figuring it would be cool to add to my repertoire. Before we always had performed this "task" externally. Find the value we want to compare, hash it and compare ...
2
votes
2
answers
408
views
Computing hash of string
I want my code to be reviewed and I'd like to hear your opinions.
Sun's code to compute hash of string:
...