2
votes
Accepted
I need help to fix my selection sort code - Practice Problems (Average High Temperatures)
that's a lot of code for a selection sort. It should be able to be sorted without need for a second array and with only two nested for loops.
The setup is pretty straightforward. I'll give a verbal ...
1
vote
Accepted
Lab 3 error message: Incorrect assignment of sorts
Your error is not in the syntax itself, but in the answers I recommend that you review them
1
vote
Accepted
PSET 3 runoff is_tie function
According to the spec:
The function should return true if every candidate remaining in the election has the same number of votes, and should return false otherwise.
I interpret the name of the ...
1
vote
Find.c - Binary Search probable integer overflow
Your values are like
+---+---+---+---+
|min|max|mid|<>=|
+---+---+---+---+
| 0|999|499| < |
| 0|498|249| < |
| 0|248|124| < |
| 0|123| 61| < |
| 0| 60| 30| < |
| 0| 29| 14| ...
1
vote
Accepted
Week 3 Binary Search Video Short question
in case we have a single element left in the array, max and min would be equal. the midpoint is calculated, and we check whether array[midpoint] is equal to the value we're looking for.
if the ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
week3 × 24pset3 × 8
tideman × 5
cs50x × 4
pset3-tideman × 4
runoff × 3
binary-search × 2
sort × 2
help × 2
plurality × 2
shorts × 2
vigenere × 1
segmentation-fault × 1
error × 1
find × 1
pointers × 1
initials × 1
search × 1
binary × 1
argv × 1
argc × 1
algorithm × 1
videos × 1
runtime × 1
commandline × 1