Java concise solution with early return.
\n    public int[] plusOne(int[] digits) {\n        int carry = 1;\n        for (int i = digits.length-1; i>= 0; i--) {\n            digits[i] += carry;\n      
    \n    public int[] plusOne(int[] digits) {\n        int carry = 1;\n        for (int i = digits.length-1; i>= 0; i--) {\n            digits[i] += carry;\n            if (digits[i] <= 9) // early return \n                return digits;\n            digits[i] = 0;\n        }\n        int[] ret = new int[digits.length+1];\n        ret[0] = 1;\n        return ret;\n    }
['Java']