Small improvement to the power of 2 loop
Author: manishjain85Created Aug 14, 2021Updated Aug 14, 2021
This code can be improved by following the FenwayTree logic -
while ( num & (num-1) > 0) {
num = num + (num & -num)
}
return numSource: mission-peace/interview