I am wondering complexity of following if statement
if (isTrue()) //case 1
VS
if(isTrue()==true) //case 2
And isTrue defined as
boolean isTrue(){
//lots of calculation and return true false based on that.
return output;
}
I was thinking, complexity of if (isTrue())
is lower then if(isTrue()==true)
because on case 2 require additional comparison for equals.
What about space complexity?
Any different thought?