Questions tagged [hash]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
50 views

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]) %...
user avatar
0 votes
1 answer
42 views

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(&...
user avatar
0 votes
1 answer
9 views

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++) ...
user avatar
0 votes
1 answer
49 views

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 ...
user avatar
0 votes
1 answer
179 views

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 ...
user avatar
0 votes
0 answers
21 views

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 ...
user avatar
0 votes
1 answer
67 views

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 ...
user avatar
0 votes
1 answer
32 views

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 ...
user avatar
0 votes
1 answer
58 views

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 ...
user avatar
0 votes
1 answer
24 views

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 &...
user avatar
  • 3
1 vote
1 answer
845 views

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 (...
user avatar
  • 17
0 votes
2 answers
132 views

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<...
user avatar
  • 1
0 votes
2 answers
328 views

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() # ...
user avatar
0 votes
1 answer
41 views

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 ...
user avatar
0 votes
1 answer
291 views

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 ...
user avatar
0 votes
1 answer
439 views

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 ...
user avatar
0 votes
1 answer
330 views

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 ...
user avatar
0 votes
1 answer
966 views

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 ...
user avatar
  • 9
0 votes
1 answer
169 views

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 ...
user avatar
  • 7
0 votes
2 answers
240 views

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 ...
user avatar
0 votes
1 answer
126 views

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 ...
user avatar
  • 97