Simple Java Solution (no copying arrays!)
Start from the end. If the current number is less than 9, we won't have a carry: increment the digit and return the array. If we have a 9, then set the current 
Start from the end. If the current number is less than 9, we won't have a carry: increment the digit and return the array. If we have a 9, then set the current to 0 and simply repeat with the next digit.\n\nHere's the kicker: if we complete the loop and don't return, this means that the whole array was set to 0! The answer must therefore be an array that's one bigger with the first number being 1. There's no need to copy to the new array since all numbers are by default initialized to 0.\n\n    public int[] plusOne(int[] digits) {\n        if(digits == null || digits.length == 0){\n            return new int[0];\n        }\n        \n        for(int i = digits.length - 1; i >= 0; i--){\n            if(digits[i] < 9){\n                digits[i]++;\n                return digits;\n            }else{\n                digits[i] = 0;\n            }\n        }\n        \n        int[] result = new int[digits.length + 1];\n        result[0] = 1;\n        \n        return result;\n    }
['Java']