problemscpp
A collection of my answers to algorithm problems in c++.
静态 Public 成员函数 | 所有成员列表
leetcode::leetcode717_1_bit_and_2_bit_characters::Solution类 参考

#include <leetcode.h>

静态 Public 成员函数

static bool isOneBitCharacter (vector< int > &bits)
 

详细描述

在文件 leetcode.h1295 行定义.

成员函数说明

◆ isOneBitCharacter()

bool leetcode::leetcode717_1_bit_and_2_bit_characters::Solution::isOneBitCharacter ( vector< int > &  bits)
static

在文件 leetcode.cpp3270 行定义.

3270 {
3271 for(int i = 0; i < bits.size();) {
3272 int next = i;
3273 if(bits[i] == 1) {
3274 next += 2;
3275 } else {
3276 next += 1;
3277 }
3278 if(next >= bits.size()) {
3279 return i == bits.size() - 1;
3280 }
3281 i = next;
3282 }
3283 return false;
3284 }

被这些函数引用 leetcode::leetcode717_1_bit_and_2_bit_characters::TEST().


该类的文档由以下文件生成: