1-bit and 2-bit Characters
这题好煞笔
class Solution {
public boolean isOneBitCharacter(int[] bits) {
int i = 0;
while(i < bits.length - 1) {
if(bits[i] == 1)
i+=2;
else
i++;
}
return i == bits.length - 1;
}
}