Purpose of line
Opened this issue · 2 comments
kolawoletech commented
for (startIndexFromEnd; startIndexFromEnd >= 0; startIndexFromEnd--) {
if (binStr.charAt(startIndexFromEnd) != '0') {
break;
}
}
Please what is the purpose of the above line?
harked commented
That is to check if the last number of binary is not 1.
Dieggore commented
why would yo do that?