Answers for "highest power of 2 less than or equal to N"

0

highest power of 2 less than or equal to N

int p = (int)log2(n);
return (int)pow(2, p);
Posted by: Guest on May-25-2021

Code answers related to "highest power of 2 less than or equal to N"

Browse Popular Code Answers by Language