Questions tagged [sort-pairs]

The tag has no usage guidance.

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

Sort_pairs fails check50 tideman

My sort_pairs function fails the check50 **:( sort_pairs sorts pairs of candidates by margin of victory ** test however it passes the usage case given on the CS50 website. In the pair type def, I ...
0
votes
1answer
30 views

Pset3 Tideman: Why is my sort_pairs function not working?

I'm green on all the criteria before sort_pair. Here's my code so far: // Sort pairs in decreasing order by strength of victory void sort_pairs(void) { // TODO // Create array of strengths of ...
0
votes
0answers
5 views

PSET3 Tideman: sort_pairs check50 error, help please

I can't figure out why check50 rejects my sorting algorithm, it works fine for me. I realize it's a little more complicated than the ones I found in the forum. Anyhow, I'd really appreciate some ...
0
votes
0answers
30 views

tideman sort pairs not working

dont know why my function isn't working, i suspect the while loop triggers even when it shouldn't. void sort_pairs(void) { // TODO supair supairs[pair_count]; supair unSorted[pair_count]; ...
0
votes
1answer
49 views

sort_pairs function not working as per check50

This seems to be a common problem where the check50 program indicates a problem with the sort_pairs function. Here was my implementation of that function: int w; int l; int w1; int l1; for (int i=0; ...
0
votes
1answer
228 views

Pset3: Tideman - Sort_pairs function

I am trying to solve sort_pairs by including a property - int winsize - into the struct of pair. The new pair struct is: typedef struct { int winner; int loser; int winsize; } pair; I ...