Skip to content

Should it be a max and not min? #152

@bkalcho

Description

@bkalcho

In this part of the code, you refer to the boundary for rand.Intn should be min. If it is min then the max generated number will be from [0, min) + 1, meaning that the guess which is > min will not be taken into count.
My understanding is it should be:

max := guess
if guess1 > max {
  max = guess1
}

This way we will evaluate against both guess and guess1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions