assume that I have an if clause
if (!f(x))
{
g(x);
}
the complexity of f(x) = O(x^3) and complexity of g(x) = O(x^2). In this case what is the overall complexity ? O(x^5) ? or O(x^3) ?
I wanted to increase my question sizes.
while(z(x))
{
for(p(x))
{
if (!f(x))
{
g(x);
}
}
}
where, z(x) = O(x^5), p(x) = O(x),f(x) = O(x^3), g(x) = O(x^2)