Questions tagged [week3]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
32 views

Tideman PSET03 - lock_pairs ERROR

I'm currently doing the Tideman PSET03 and I've completed almost everything except ``. Could you tell me why this is happening? It'd appreciated. Check50: https://submit.cs50.io/check50/...
AlvaroAndLukeTheCoder's user avatar
0 votes
0 answers
15 views

Tideman - First Error of lock_pairs function is not working

I'm currently doing the lock_pairs function of tideman. I have completed most of the requirements of check50 in the lock_pairs function except :( lock_pairs locks all pairs when no cycles. I don't ...
AlvaroAndLukeTheCoder's user avatar
0 votes
0 answers
24 views

Tideman PSET03 - Add_Pairs errors!

I'm currently doing the tideman pset and i have some errors on the add_pairs function and the lock_pais function but I'm more focused now on the add_pairs function. I don't know why these errors are ...
AlvaroAndLukeTheCoder's user avatar
0 votes
0 answers
26 views

Tideman PSET03 - Please Help Me!

I've been doing Tideman and I've completed every function required. But when I run Check50, it gives me some errors: add_pairs function did not produce 2 pairs , lock_pairs did not lock all pairs, ...
AlvaroAndLukeTheCoder's user avatar
0 votes
0 answers
25 views

I don't know why my code doesn't work correctly, can you help me? PSet03 - Runoff

I,ve been completed all the functions that i'd need to complete in the Pset Runoff but I don't know why when I do the check50 it gave some errors and My code doesn't print out the winner as well. Here ...
AlvaroAndLukeTheCoder's user avatar
0 votes
1 answer
566 views

I need help to fix my selection sort code - Practice Problems (Average High Temperatures)

I need help fixing my code. I don't know what else to do, I've been trying to sort all the temps array in descending order. But I don't know what I'm doing wrong. Can you help me saying what things I ...
AlvaroAndLukeTheCoder's user avatar
0 votes
0 answers
70 views

Tideman - print_winner function fails to pass check50

Been scratching my head about this: I can't pass the Check50 test for my Tideman codes, under the following 2 conditions, despite that I had tried with different voting tests and the script always ...
loul7's user avatar
  • 1
0 votes
1 answer
365 views

Lab 3 error message: Incorrect assignment of sorts

When I try to submit my answers I get these messages on running check50: :) answers.txt :) answers all questions :( correctly identifies each sort Incorrect assignment of sorts. I'm not sure I'm ...
J.Wallwork's user avatar
0 votes
1 answer
84 views

collatz function

So in a week 3 short, Doug asks us to define a file collatz.c that returns the number of steps taken to do the collatz conjecture on different numbers and I ended up with this. #include <stdio.h>...
Aayed Hassan's user avatar
0 votes
2 answers
417 views

Plurality: Code does not print out the winner

My code does not print out the winners at all...It only outputs their names. Is anybody able to pick out what's incorrect or if the code is missing something? Many thanks in advance :) #include <...
Soya's user avatar
  • 5
0 votes
1 answer
330 views

PSET 3 runoff is_tie function

New to this platform, forgive me if there are some norm or etiquette I may be missing. Please feel free to provide feedback on anything that is incorrect. This is for the is-tie function alone. I ...
x code's user avatar
  • 23
0 votes
1 answer
161 views

why am i getting an " use of undeclared identifier 'j' or 'i' " on the vote and tabulate functions?

shouldn't the compiler consider the 'i' and the 'j' from the for loop in the 'main' function to be the voter and rank ints passed to the functions #include <cs50.h> #include <stdio.h&...
Moamen elafifi's user avatar
0 votes
1 answer
97 views

Can you help me to understand why does the output of time function vary every time while applying it on same file with same sort type?

When I run for example (time ./sort1 random5000.txt) it gives me real, syst, and user time. But if I run the same command again it will gives me different time results! I can't understand why this ...
Aya Othman's user avatar
0 votes
1 answer
35 views

when to search in binary search right, when left?

in the binary search algorithm: If no items Return false If middle item is 50 Return true Else if 50 < middle item Search left half Else if 50 > middle item Search right half like can we do the ...
sumer fattoum's user avatar
0 votes
2 answers
664 views

Error testing in plurality question

I already test my code with all possible input and it working fine but when I run with check50 cs50/problems/2020/x/plurality, I got a couple of error result :( print_winner identifies Bob as ...
Loran's user avatar
  • 101
0 votes
1 answer
17 views

call stacks short vedio

in the call stacks short there is a code when doug explains that the function returns (1) i want to know how the c knows or the computer knows the difference between returning (1) mean the program ...
ox0o's user avatar
  • 35
0 votes
2 answers
16 views

Hexadecimal video unaccessible

The Hexadecimal video in Week 3 is not accessible.
Wen Lei's user avatar
0 votes
1 answer
66 views

Find.c - Binary Search probable integer overflow

Here's the gist: https://gist.github.com/Securiteru/a83e4f1a028acd0b1013def793b5dcdc And the output: ... 60697 61151 61190 61275 61460 61608 61618 61746 61750 61822 62111 62178 62183 62311 62448 ...
Securiter's user avatar
0 votes
1 answer
47 views

Concept of run time in lecture week 3

In week 3's lecture, David talked about the concept of runtime where the worst possible scenario for say insertion sort is O(n squared) and the best case scenario would be omega(n). I dont understand ...
Iberico's user avatar
  • 29
0 votes
1 answer
53 views

Week 3 Binary Search Video Short question

I just watched the short for binary search and I'm having trouble understanding how making a conditional of (max < min) would mean that the number is not in your array (timestamp 04:05). I get ...
CS50_on_the_go's user avatar
0 votes
1 answer
94 views

Pointers basic Concept with functions

http://cslibrary.stanford.edu/102/PointersAndMemory.pdf Reading this told us that when function gets called its locals gets called and when it exits its locals gets destroyed so that we can't use its ...
Habib ur Rehman's user avatar
0 votes
1 answer
31 views

week3 lecture very beginning

Week3 Lecture: A student asked a question of my mind how do computer know about the argc ? I really don't understand how is this argc working In case we printed "zymla" we gave argv[1] as our first ...
Habib ur Rehman's user avatar
0 votes
1 answer
115 views

vigenere ,, segmentation fault core dumped [duplicate]

the code compiles well ,, but an error ocures
Steinberger's user avatar
0 votes
1 answer
217 views

Initials ,, The Right output but not accepted

I have all outputs Right Desperate Help Yelling
Steinberger's user avatar