Skip to content

717-1-bit-and-2-bit-characters

DevGod
DevGod
Vtuber
/**
* @param {number[]} bits
* @return {boolean}
*/
var isOneBitCharacter = function(bits) {
let I = 0;
while(I<bits.length-1){
I += bits[I]+1;
}
return bits[I] === 0;
};