Questions tagged [hash]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer

PSet5 Speller: Are we hashing the words in the dictionary into a hash table or the words of the text?

I've completed the first function of the Problem set, where I've sorted every word in the dictionary into a trie, but I don't know if I was supposed to do that in the hash function, and something else ...
They think im slow EH's user avatar
0 votes
1 answer

PSET5 - 3 conceptual questions (debug not needed)

Question 1 (hash) – is it even remotely possible to reverse engineer the hash function when given lots of output? For example if the underlying hash function is something simple like tolower(word[0]) %...
Vincent Xu's user avatar
0 votes
1 answer

PSET5 Why Speller can't load dictionary? (included HASH function in case it's relevant)

// Load function bool load(const char *dictionary) { char word[LENGTH + 1]; FILE *file = fopen("dictionary", "r"); if (file == NULL) { printf(&...
General Noob's user avatar
0 votes
1 answer

Output is only 1 row of dots before hash, will you check out my code?

... for(dots = height - 1; dots >= 1; dots--) { printf("."); } for(horizontal = 0; horizontal < height; horizontal++) { for(vertical = 0; vertical <= horizontal; vertical++) ...
echothat's user avatar
0 votes
1 answer

Speller skips first word in dictionary

After chasing down and eliminating memory leaks, I think I am getting close to finishing speller. So far, valgrind says no memory leaks, and the output is formatted correctly. However, when running my ...
Rachel D's user avatar
0 votes
1 answer

Speller not working! What's going on?

My function returns this: WORDS MISSPELLED: 375902 WORDS IN DICTIONARY: 143091 WORDS IN TEXT: 376904 TIME IN load: 0.02 TIME IN check: 1.20 TIME IN size: 0.00 TIME ...
bobthebuilder's user avatar
0 votes
0 answers

Pset5: Problem with loading multiple words with the same hash number

I am having problems with loading multiple words with the same hash code. The hash function I chose, from what I can understand, takes the ascii codes of all of the words in the dictionary, and ...
Devin Atalay's user avatar
0 votes
1 answer

Pset5 Speller: every word in text reported as misspelled

Code compiles, dictionary loads and unloads, word count works and hash function seems to work. However, the results show that every word in the text is misspelled. I’ve spent 3 weeks tweaking the code ...
Dustin Sanders's user avatar
0 votes
1 answer

crack, Different passwords produce the same HASH

i have a hard time understanding the crypt function and since there aren't any technical details of how it works out there, i tested it and i observed that it is producing the same hash for different ...
Foudouki's user avatar
0 votes
1 answer

PSet2 Crack: crypt() returning same hash

EDIT: I solved my problem by entirely re-writing my code. I still am not sure what went wrong. I've been trying to go at the crack problem for a while now and it keeps returning the same hash. For ...
PotatoesFall's user avatar
0 votes
1 answer

Question about PSet 2 Crack

I just started on the crack problem and wanted to ask a quick preliminary question about understanding the crypt function. Here is my code: #include <cs50.h> #include <stdio.h> #include &...
hli's user avatar
  • 3
1 vote
1 answer

Clueless on where to start for Mario (Less comfortable) in CS50 2019

I am currently in the process of finishing Problem Set 1 from CS50 2019, which involves creating a pyramid out of hashes. The pyramid must be made by the user inputting a number between 1 and 8 (...
AK-25's user avatar
  • 17
0 votes
2 answers

pset1 always adding extra one space on each Hash row

#include <cs50.h> #include <stdio.h> int main() { int height; do { height = get_int("Enter the height between 1 & 8\n"); }while(height<1 || height>8); for(int i=0; i<...
Depak's user avatar
  • 1
0 votes
1 answer

The predefined login function does not seem to be working in finance

All the registered ids are not able to log in. Even though the username and password are correct the website returns 400 error def login(): """Log user in""" # Forget any user_id session.clear() # ...
Kushagra Chawda's user avatar
0 votes
1 answer

checking structure of a hash table? pset5 dictionary

I am currently working on the load dictionary function of pset5. I was wondering if anyone has any suggestions for how to go about checking if the organization of one's hash table and the sorting of ...
faelesterio's user avatar
0 votes
1 answer

IDE is not letting me hash the password. Should I change th hashing algorithm as it tells me to?

I implemented the register function for pset7. It went to the register page that I had implemented. I gave the required credentials and clicked Register. But instead of registering with the ...
Amol Venkataraman's user avatar
0 votes
1 answer

Segmentation Fault on Hashtable

PLease Someone help me I was trying to implement a hash table that stores the word of English language for pset 5. So to be in brief, I used an array of linked list ( Chaining ) , I haven't made the ...
amethyst stan's user avatar
0 votes
1 answer

PSet 5 Speller Compiles, but Not Producing Output

My spell checker compiles, but doesn't appear to be producing anything when I attempt to run it. It prints "Mispelled Words" and then nothing else, so I suspect my error is in check. Here is what that ...
Alex Durante's user avatar
0 votes
1 answer

Problems with hash function in pset5

I'm using a hash function I found online that's meant to be quick but it's throwing an error that I don't understand (and as I've cut and paste it, I don't get what the issue can be?). Everything else ...
MelJ79's user avatar
  • 9
0 votes
1 answer

only loads 1 word in dictionary

Not sure if rest of code works correctly but I cannot get the load function loading more than 1 word. It only loads the first word from the dictionary and no more. Can somebody please give some hint ...
Inge's user avatar
  • 7
0 votes
2 answers

In pset5 is there a preferred place to put the hash function?

For example, could it go in dictionary.h? It seems like that would make the overall structure clearer, but I'm basically just lost. I plan to begin with a trivial hash function to make debugging ...
Robert Feduniak's user avatar
0 votes
1 answer

Spell-checking segmentation fault

I am getting a segmentation fault with my speller program. I've placed check,unload and size under comments in an attempt to identify the cause of my problem. I belive my implementation of load or the ...
Gabriel's user avatar
  • 97