inOrder chalenge


I am working on below challenge

I tried my code as below

public boolean inOrder(int a, int b, int c, boolean bOk) {

return true;

return true;
return false;

return false;

Open in new window

I am getting below result

Expected      Run            
inOrder(1, 2, 4, false) → true      true      OK         
inOrder(1, 2, 1, false) → false      false      OK         
inOrder(1, 1, 2, true) → true      true      OK         
inOrder(3, 2, 4, false) → false      false      OK         
inOrder(2, 3, 4, false) → true      true      OK         
inOrder(3, 2, 4, true) → true      true      OK         
inOrder(4, 2, 2, true) → false      false      OK         
inOrder(4, 5, 2, true) → false      false      OK         
inOrder(2, 4, 6, true) → true      true      OK         
inOrder(7, 9, 10, false) → true      true      OK         
inOrder(7, 5, 6, true) → true      true      OK         
inOrder(7, 5, 4, true) → false      false      OK         
other tests

how to  improve my approach and design of this challenge. How do i make a

graphical venn or some other relevant diagram to design it before writing single

line of code to decide best strategy?
 Please advise
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

return (bOk||a<b)&&b<c;
gudii9Author Commented:
what is meaning of below code

return (bOk||a<b)&&b<c;

please advise
if "bOk" is true, b does not need to be greater than a

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.