【leetcode】717. 1比特與2比特字符

 

bool isOneBitCharacter(int* bits, int bitsSize){
    for(int i=0; i<bitsSize; i++){     
        if(i==bitsSize-1 && bits[i]==0)
            return true; 
        if(bits[i]==1) 
            i++;
    }
    return false;
}
相關文章
相關標籤/搜索