package leetcode;

/**
 * https://leetcode.com/problems/1-bit-and-2-bit-characters/
 */
public class Problem717 {
    public boolean isOneBitCharacter(int[] bits) {
        // TODO
        return false;
    }

    public static void main(String[] args) {
        Problem717 prob = new Problem717();
        System.out.println(prob.isOneBitCharacter(new int[]{1, 0, 0})); // true
        System.out.println(prob.isOneBitCharacter(new int[]{1, 1, 1, 0})); // false
    }
}

@@ -170,30 +170,42 @@
     
-// TODO%0A        return
+int i = 0;%0A        boolean found =
  fal
@@ -216,263 +216,240 @@
     
-%7D%0A%0A
     
-public static void main(String%5B%5D args) %7B%0A        Problem717 prob = new Problem717();%0A        System.out.println(prob.isOneBitCharacter(new int%5B%5D%7B1, 0, 0%7D)); // true%0A        System.out.println(prob.isOneBitCharacter(new int%5B%5D%7B1, 1, 1, 0%7D)); // false
+while (i %3C bits.length) %7B%0A            if (bits%5Bi%5D == 1) %7B%0A               i += 2;%0A               found = false;%0A            %7D else %7B%0A                i++;%0A                found = true;%0A            %7D%0A        %7D%0A        return found;
 %0A   

Solve problem 717