Hot answers tagged

2 votes

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 ...
Cliff B's user avatar
  • 68.4k
1 vote

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
Bruno Costa's user avatar
1 vote

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 ...
DinoCoderSaurus's user avatar
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| ...
Blauelf's user avatar
  • 20.9k
1 vote

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 ...
kzidane's user avatar
  • 17.7k

Only top scored, non community-wiki answers of a minimum length are eligible