Skip to content

CodingBat-Logic1-inOrderEqual #257

@divinedragon

Description

@divinedragon

Write code and JUnit test cases for CodingBat-Logic1-inOrderEqual

Url - http://codingbat.com/prob/p140272

Problem Statement:

Given three ints, a b c, return true if they are in strict increasing order, such as 2 5 11, or 5 6 7, but not 6 5 7 or 5 5 7. However, with the exception that if "equalOk" is true, equality is allowed, such as 5 5 7 or 5 5 5.

inOrderEqual(2, 5, 11, false) → true
inOrderEqual(5, 7, 6, false) → false
inOrderEqual(5, 5, 7, true) → true

Expected method declaration

public boolean inOrderEqual(int a, int b, int c, boolean equalOk) {
}

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