X442: BigO - Cross Road BigO

What would be the Big O Complexity for the following method?

public boolean crossRoad(boolean isSafe, int height, int length) {
   if (isSafe) {
       return true;
   } else if (height < 10) {
       return true;
   } else {
       return length > 13;
   }
}


Your Answer:

Select one answer:


Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.