@@ -0,0 +1,942 @@
+/**%0A *Given a binary array, find the maximum number of consecutive 1s in this array.%0A *%0A *Example 1:%0A *Input: %5B1,1,0,1,1,1%5D%0A *Output: 3%0A *Explanation: The first two digits or the last three digits are consecutive 1s.%0A *    The maximum number of consecutive 1s is 3.%0A *Note:%0A *%0A *The input array will only contain 0 and 1.%0A *The length of input array is a positive integer and will not exceed 10,000%0A *%0A */%0Aclass Solution %7B%0A    public int findMaxConsecutiveOnes(int%5B%5D nums) %7B%0A        int size = nums.length;%0A        StringBuilder sb = new StringBuilder();%0A        for (int i = 0; i %3C size; i++) %7B%0A            sb.append(String.valueOf(nums%5Bi%5D));%0A        %7D%0A        String%5B%5D results = sb.toString().split(%220%22);%0A        int length = results.length;%0A        int result = 0;%0A        for (int i = 0; i %3C length; i++) %7B%0A            int temp = results%5Bi%5D.length();%0A            if (result %3C temp) result = temp;%0A        %7D%0A        return result;%0A    %7D%0A%7D%0A

Create MaxConsecutiveOnes.java