Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Please help!!! PS3 runoff.
Post Flair (click to view more posts with a particular flair)
Post Body

find_min()

int find_min(void)
{
    int min = max;
    for (int i = 0; i < candidate_count; i  )
    {
        if ((candidates[i].votes <= min) && ((candidates[i].eliminated) == false))
        {
             min = candidates[i].votes;
        }

    }
    return min;
}

is_tie()

bool is_tie(int min)
{
    // same no.of votes
    int sv = 0;
    for (int j = 0; j < candidate_count; j  )
    {
        if ((candidates[j].votes == min) && ((candidates[j].eliminated) == false))
        {
            sv  ;
        }
    }
    if ((sv > 1 ) && (!(min < max)) )
        return true;
    else
        return false;

}

Error(s) of find_min()

:( find_min returns minimum number of votes for candidate
    find_min did not identify correct minimum
:( find_min returns minimum when all candidates are tied
    find_min did not identify correct minimum
:( find_min ignores eliminated candidates
    find_min did not identify correct minimum

error is_tie()

:( is_tie returns false when only some of the candidates are tied
    is_tie did not return false

Author
Account Strength
60%
Account Age
3 years
Verified Email
Yes
Verified Flair
No
Total Karma
347
Link Karma
14
Comment Karma
9
Profile updated: 2 days ago
Posts updated: 4 days ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
2 years ago