Questions tagged [pset5]

The problem set for Week 5 will challenge you to apply what you've learned about pointers, memory management, file i/o and structs, creating more complex data structures (such as Hash Tables or Tries) and leveraging their power to write a lightning-fast spell check algorithm.

Filter by
Sorted by
Tagged with
-1 votes
1 answer
43 views

DON'T KNOW HOW TO HANDLE THIS CHECK50 ERROR MESSAGE WITH test_plates.py

I'm dealing with Units Test and Problem set 5 test_plates.py/plates.py. I get this msg: My function is_valid(s) checks this at very beginning. I have not idea about what i'm not dealing or handling ...
Roberto's user avatar
0 votes
1 answer
32 views

pset 5 speller do not pass check 50

I do not know what I am doing wrong. Please, give me a hint. Here is my solution from check50: :( spell-checking is case-insensitive Cause expected "MISSPELLED WOR...", not "MISSPELLED ...
user40089's user avatar
0 votes
1 answer
44 views

pset5 speller cannot read number of word in dictionary

thank you for clicking. Being concise, I have the right solution for the pset, as evidenced down below by comparing my solution to the staff's, but check50 insists that no words have been loaded into ...
user40380's user avatar
0 votes
1 answer
28 views

Pset5 Speller - Weird Load Function Bug (Edited w/ Code)

bool load(const char *dictionary) { // TODO FILE *fdict = fopen(dictionary, "r"); if (fdict == NULL) { return false; } // create container string to hold ...
Poptart's user avatar
0 votes
1 answer
58 views

Refueling - problem set 5 - CS50

I have a problem with refueling from problem set 5 of cs50p. I tried and implement a lot of version of the code, always good enough to do the job and pass the test but check50 fails. I give fuel.py ...
domionico's user avatar
0 votes
1 answer
13 views

Code for pset5 compiles, but produces no OUTPUT. Seems like it is stuck in infinite loop

Description of Problem: Hey guys, so my code is outputting only MISSPELLED WORDS and then it apparently gets stuck in an infinite loop. So that I have to type ctrl + C to be able to type anything in ...
Mateus Machado's user avatar
0 votes
1 answer
24 views

Speller works fine up until a certain point

My speller program has an issue where it will find what words are misspelled properly, but it won't give the data of the amount of words misspelled/ in the dictionary/ in text. Running Check50 shows ...
esqflowne's user avatar
0 votes
0 answers
16 views

Speller big-board

How can I see where I would rank on the speller big-board? I know it doesn't exist anymore, but I'd like to see how far is my result from the best ones. I tried to write "texts/*.txt" ...
Nicolò Tiraboschi's user avatar
0 votes
1 answer
36 views

Speller Segmentation Fault Even After Freeing Malloc'd Nodes

The following is my code and, subsequently, the message Valgrind returns when I run it on ./speller texts/lalaland.txt. I explored similar issues previously posted on Stack exchange, and added lines ...
Hamster1303's user avatar
0 votes
0 answers
32 views

pset50 could not unload dictionaries/large

// Implements a dictionary's functionality #include <ctype.h> #include <stdbool.h> #include <stdio.h> #include <string.h> #include <strings.h> #include <stdlib.h> #...
Selim Allen's user avatar
0 votes
0 answers
13 views

how to fix this errorÉ

this is the code i have right now: #define _CRT_SECURE_NO_WARNINGS #include <iostream> #include "CalorieList.h" #include "cstring.h" namespace sdds { void CalorieList::...
Ryan Jang's user avatar
0 votes
1 answer
43 views

CS50 Speller works but check50 doesn't

My code seems to work fine with all text files. When I look at the errors it doesn't even show actual output, why could that be? https://submit.cs50.io/check50/e963f4484de14f0b73f8fca9a5e9431556cb649a ...
MUKTANANDA MICHAEL STIMPFIG's user avatar
0 votes
1 answer
36 views

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
16 views

PSet5 Speller: What is each function in dictionary.c supposed to do? [closed]

I've started working on this PSet, and now I'm confused because in the instructions I can't figure out where it tells me what each function is supposed to do. Hash is never even called in speller.c so ...
They think im slow EH's user avatar
0 votes
1 answer
31 views

Speller: memory leak

This is my program: // Implements a dictionary's functionality #include <ctype.h> #include <stdbool.h> #include <string.h> #include <stdlib.h> #include <stdio.h> #...
shirin's user avatar
  • 1
0 votes
0 answers
21 views

Need help with speller.c

So, when I was testing my code for pset5's speller, I ran it and it worked not so well, to be honest, heres my code if you wanna know: #include <ctype.h> #include <stdbool.h> #include <...
aidiotwholikescoding's user avatar
0 votes
1 answer
22 views

pset5 segmentation faoult

Good morning, I have segmentation fault on my dictionary.c code, I was trying to find a Typ0 mistake or variable declaration mistake but I can not find anyone. Also I can not find logic errors, so I ...
Victor Araya's user avatar
0 votes
1 answer
49 views

Everything is correct in my Check50 but in program I have other ERRORS - PSET05 Speller

I hope you're doing well and I also hope you might help me. When I run my CHECK50 in my speller program. Everything is correct all green, but when I run my program or valgrind I have some errors. And ...
AlvaroAndLukeTheCoder's user avatar
0 votes
0 answers
51 views

Lab 5 'Inheritance': program successful in terminal but check50 time-out

I am currently stuck on lab 5: 'inheritance'. I am really unsure where the problem is as my code compiles and runs fine, producing the expected table as given in the CS50 documentation. However, when ...
niall_grant's user avatar
0 votes
1 answer
33 views

Pset5 speller segmentation fault when loading

When I run speller, I get a segmentation fault. I have played around with the code a little bit and nothing so far has changed. Using help50, this is the result I got: Looks like you're trying to ...
Team's user avatar
  • 5
0 votes
1 answer
37 views

PSET 5 "SPELLER" : Why this hash function resulting in SEGMENTATION FAULT(core dump)?

If i run it in another smaller program it works fine( returns the key correct) but on the pset 5 speller it gives segmentation fault. why?
Sharyar Javaid's user avatar
0 votes
1 answer
1k views

check50 error expected exit code 0, not 1

I was following python programming course and with the unit test chapter I updated the main file and the test files as described in this problem set page. Now I'm sure that my tests are running fine ...
Tuhin's user avatar
  • 3
0 votes
1 answer
76 views

pset5: Check50 fails for Speller but everything looks good

I wrote dictionary.c. It compiles. There are no issues with valgrind. It appears to run correctly (when comparing with answer keys). Everything looks good. But when I run Check50, it runs into issues ...
Conor O'Mahony's user avatar
0 votes
1 answer
45 views

pset5 speller valgrind test fails

in check50 my code fails last test (valgrind test) fails it says: "Use of uninitialised value of size 8: (file: dictionary.c, line: 41)" i starred line 41 below, I tried both using if(!...
Emre Kırmızı's user avatar
0 votes
1 answer
1k views

correct plates.py passes all test_plates checks: expected exit code 0, not 2

On pset 5, I am getting this error from check50: :( correct plates.py passes all test_plates checks expected exit code 0, not 2 I am confused because my plates.py does pass all test_plates checks:...
Aleksey Tsalolikhin's user avatar
0 votes
1 answer
32 views

PSET5 Speller case conversions

I've been struggling with writing code for case conversions in the check function to make all hash words to be lower-cased. My lack of knowledge in programming overall seems to be revealed at this ...
Jae-Min's user avatar
0 votes
0 answers
31 views

(pset5)I get a segmentation foult, even though check50 says that everything is allright

as per the title — I get a segfoult and can't check my times, even though check50 claims that the code is practically ready to submit. Here's my code, followed by valgrind results: // Implements a ...
Two-FaceFIL's user avatar
0 votes
1 answer
144 views

Pset5 Speller - Valgrind issue

this one was tough. But in the end my code compiles fine and has no memory leaks, the hash function isn't very good but it works. Yet I still get an error message that I just don't understand. First, ...
fth's user avatar
  • 3
0 votes
1 answer
47 views

Pset5 speller memory error --valgrind says no leaks

I almost finished pset 5 speller, I ran check50 and only the last criteria was not matched. That is "valgrind tests failed; see log for more information." The confusing thing is, when I ran ...
Eva Chen's user avatar
0 votes
1 answer
27 views

PSET5 Speller seg fault

I keep having segmentation fault in Pset5 Speller. I used debugger to find the line where seg fault happens, and it was "table[k] = n;" in function load. I don't really understand. Could ...
Eva Chen's user avatar
0 votes
0 answers
39 views

I'm working on pset5 - speller, it works fine when I run/test it, but when I run 'check50' it show this error. help me with this

[EDIT: Code removed for Harvard Honor Code compliance.]
Santhosh's user avatar
0 votes
2 answers
171 views

Valgrind error in pset5 speller

newbie here this is my first post, I hope you guys can help me! I am stacked with speller, my program works apparently fine but the valgrind test outputs some errors that I can't understand. I have ...
turo's user avatar
  • 3
0 votes
1 answer
49 views

pset5 speller load and hash functions

Whenever I run speller.c it appears that none of the words are getting loaded into the dictionary as the output looks like this: MISSPELLED WORDS A cat is not a caterpillar WORDS MISSPELLED: 6 ...
Sharl's user avatar
  • 3
0 votes
2 answers
118 views

PSET 5 Speller Check50 Problem

I think I have done everything you're supposed to do in PSET5 Speller. when I manually check the outputs of my code, it works perfectly well. It matches the staff solutions one to one. Yet Check50 ...
dohaal's user avatar
  • 1
0 votes
1 answer
33 views

PSET 5 Speller Valgrind Memory

My code is functional according to check50 but I'm still leaking bad memory. Based on amount of memory lost, I'm guessing something to close up in LOAD, but could be UNLOAD as well. First thoughts are ...
mcweebus's user avatar
0 votes
1 answer
68 views

PSET5 - Speller - Valgrind returns memory leak

After many trials, I am currently stuck in this Pset. The full code that I have is as follows: // Implements a dictionary's functionality #include <ctype.h> #include <stdbool.h> #include &...
Dr. Whiskers's user avatar
0 votes
1 answer
38 views

PS5 - Speller - Unload function

I have been going through the Pset5 (Speller) and I am currently stuck. Right now, I am just trying to have a functional code, so I am not worried about how optmized my functions (specially the Hash ...
Dr. Whiskers's user avatar
0 votes
1 answer
39 views

pset 5 speller, turning frowns upside down

I thought i had wrote a correct programme for speller, check 50 says that my code compiles but that is all it does! I have been running my programme and combing through each function and I still can't ...
Jay Donoghue's user avatar
0 votes
1 answer
45 views

Pset5 Speller - Got "Conditional jump or move depends on uninitialised value(s)", "Use of uninitialised value of size 8" by check50

I try my code here to solve the pset5 - speller question, it seems pretty ok with locally run my valgrind. But when I use check50 to check it. One error(and only 1) happened. I tried to assigned ...
Li-Yu Chu's user avatar
0 votes
1 answer
44 views

Pset5 Speller Issue With Substrings and Apostrophes

I'm able to compile my code for speller and it appears to work correctly. Valgrind shows that there are no memory errors. But when I run check50, I get back :( notices saying my code isn't handling ...
getsendy's user avatar
0 votes
1 answer
47 views

Speller segmentation fault and valgrind issues

I'm working on Speller and am able to get it to compile but get a segmentation fault when I run it. When I use valgrind, I also appear to be leaking 27 bytes of memory. Anyone able to see where I am ...
getsendy's user avatar
0 votes
1 answer
26 views

CS50 PSET 5: Returning 0 words in large dictionaries only

I've been trying to figure this out for a while now. I'm doing PSET 5 and all my dictionary words in large texts return 0, though when I've tried the small dictionary, it returns the words fine there. ...
figuringitout101's user avatar
0 votes
1 answer
109 views

Pset5 speller memory leak (valgrind: definitely lost)

There is a memory leak problem with my code when I ran it with valgrind.I have already check my code and passed all of them except for memory test.I am hoping someone can help me solve this problem....
mad_oreo's user avatar
0 votes
1 answer
38 views

segmentation fault from pointers

i keep getting segmentation fault when running this code. using printf i can see its from loading ala and the hashtable to store this is set to nil. other words when the hashtable to store them is nil ...
yosef's user avatar
  • 5
0 votes
1 answer
116 views

Speller works for everything but one letter words

When I run my speller program it works on everything but one letter words. I have been trying to figure this problem for a long time. I think it is a problem with either my hash or check functions. ...
Ajy_Chikn's user avatar
0 votes
0 answers
123 views

Pset5 Speller Memory Problem

I am having a memory issue with my program in speller. Check50 returns all green except for the last line which says :( program is free of memory errors expected "MISSPELLED WOR...", not &...
sage7major16's user avatar
0 votes
1 answer
49 views

Speller outputs all words as misspelled

I currently am doing the Week 5 Speller project. My code outputs all words as misspelled. I think it has to do with the load() function, but I am not sure if or why it is doing that. I don't think ...
Yash-902's user avatar
0 votes
1 answer
41 views

segmentation fault with node pointers on speller

I know which line has the segmentation fault , if (table[hashn]->next == NULL) In this case hashn is 0 so its not exceeding the array Any ideas why its happening?
Leo8479500282664829200's user avatar
0 votes
1 answer
72 views

PSET5: Problem with my check function, but I'm not sure

I have been stuck with this problem for many hours now, but I still can't wrap the idea around my head. When I test run this code, it just prints out "MISSPELLED WORDS", and nothing more. ...
amadeus445's user avatar
0 votes
1 answer
69 views

PSET5 - SPELLER - Check50 only works locally

I am trying to run check50 on my version of speller. I worked for so long on this code. It was a battle every step of the way to get it to finally run. I finally seemingly got it today. My code works ...
ruscias's user avatar

1
2 3 4 5
26