JAVA || 0ms || Easy || 100% ✅
If it helps, do an Upvote \u2B06\uFE0F\uD83C\uDD99 So others can also find it helpful\n\nclass Solution {\n    public int[] plusOne(int[] digits) {\n        \n 
If it helps, do an Upvote \u2B06\uFE0F\uD83C\uDD99 So others can also find it helpful\n```\nclass Solution {\n    public int[] plusOne(int[] digits) {\n        \n        for(int i = digits.length - 1; i >= 0; i--){\n            if(++digits[i] != 10) return digits;\n            digits[i] = 0;\n        }\n        int [] res = new int[digits.length + 1];\n        \n        res[0] = 1;\n        return res;\n    }\n    }\n\n```
['Java']