I don,t how will you say if condition is always true. I explain through small example.
#include <stdio.h>
#include<stdbool.h>int main()
{
printf("Hello World");
int n =7;
bool s = !(n & (n-1));
printf("%s\n",s?"true":"False");
return 0;
}
output of !(n & (n-1)) is false if n is odd like 7,9,1 e.t.c
false && (true/ false) is always false. so if n is odd number then if condition is not satisfied and then enter into while condition that take O(logn) time complexity.
If anything you feel wrong plz.. comment !