leetcode

Solution to some Leetcode problems written in C++
git clone git://git.dimitrijedobrota.com/leetcode.git
Log | Files | Refs | README | LICENSE

0717.cpp (254B)


0 class Solution {
1 public:
2 bool isOneBitCharacter(const vector<int> &bits) const {
3 int last = -2;
5 for (int i = 0; i < size(bits); i++) {
6 if (bits[i]) last = i++;
7 }
9 return last != size(bits) - 2;
10 }
11 };