Skip to main content
1 vote
1 answer
85 views

I’m working on the CS50 speller problem and running into an issue. My program is reading way more misspelled words than it should. I’ve traced the problem to my check function. From what I can tell, ...
Joe Jarvis's user avatar
3 votes
2 answers
162 views

I think this is a design problem. I’m trying to implement a hash table library in C89 in which the user will be able to insert mixed-type literal keys and values, e.g., HT_SET_LITERAL(&ht, "...
os_user's user avatar
  • 100
3 votes
1 answer
227 views

I need to find the union of many (about 1M) 64-bit integer vectors, each has about 10K integers. There are duplicates in each array and also duplicates among different arrays. A simple algorithm is to ...
user416983's user avatar
  • 1,106
9 votes
2 answers
743 views

I am trying to make an std::unordered_set whose key is of type std::tuple. The below code compiled by MSVC gives me: Error C3848 expression having type 'const _Hasher' would lose some const-volatile ...
PkDrew's user avatar
  • 2,301
2 votes
1 answer
123 views

EDIT: As one of the people commenting mentioned, this question only concerns this specific implementation: https://github.com/openjdk/jdk/blob/master/src/java.base/share/classes/java/util/HashMap.java#...
Sebastian's user avatar
1 vote
1 answer
28 views

I have a hashtable below (which holds server related info) with a ‘template’ key value. I have a loop which duplicates the value and assigns with a new key Then in the new key values I would modify ...
CaptainObv's user avatar
3 votes
5 answers
203 views

I wrote some code where I tried to make list members unique by converting the list to a hash and then using the keys of that hash as elements. This worked without complaint in Perl 5.18, but now fails ...
U. Windl's user avatar
  • 4,748
1 vote
1 answer
78 views

I have been asked what is a problem with hash function: h(S) = ((sum(S[i]*x**i)) mod p) mod m, where i = {1, ..., s-1}. S - some long string, x - some positive number, s - length of S, p - number(...
Pavel's user avatar
  • 11
1 vote
2 answers
114 views

I’m trying create some automations to help with general activities on an environment and was trying to think of a clean accessible way to store and access info via powershell hashmaps $test=@{ &...
CaptainObv's user avatar
0 votes
1 answer
54 views

Given an array of n integers in the range [-n²,n²], how can I find any two indices i<j where the absolute difference between the elements equals the distance between their positions? I'm looking ...
Yara Halloun's user avatar
1 vote
2 answers
85 views

I'm writing some C code using GLib and using GHashTable to store some data. However, sometimes I need to do a "reverse lookup" where I need to find the first key that matches a given value. ...
Newbyte's user avatar
  • 3,957
1 vote
1 answer
91 views

I'm working on a code which is supposed to load a dictionary and check if the words in a text is correct. The code compiles when working with small lists (for dictionary) yet I get 'segmentation error:...
cntzcn's user avatar
  • 11
1 vote
1 answer
234 views

I am not much of a programmer but i have read some where that hash tables are fast when checking existence of data. I have a list containing 4 million elements of at least 120 bytes each which i need ...
Candy's user avatar
  • 13
5 votes
3 answers
166 views

#define SIZE 100000 // 1. hash_function() is a function that return an int // 2. snowflake_node typedef struct snowflake_node { int snowflake[6]; struct snowflake_node *next; } snowflake_node; ...
arifnone's user avatar
1 vote
0 answers
67 views

I approached a problem when I tried to use XXH3_64bit from <xxhash.h> module over the wrapper with __fastcall for GHashTable initialization, but the type definition for GHashFunc requires the ...
Brain_driver_not_found's user avatar

15 30 50 per page
1
2 3 4 5
368