0 ms Java Solution
\nclass Solution {\n   public int[] plusOne(int[] digits) {\n        \n    int n = digits.length;\n    for(int i=n-1; i>=0; i--) {\n        if(digits[i] < 9) {\
```\nclass Solution {\n   public int[] plusOne(int[] digits) {\n        \n    int n = digits.length;\n    for(int i=n-1; i>=0; i--) {\n        if(digits[i] < 9) {\n            digits[i]++;\n            return digits;\n        }\n        \n        digits[i] = 0;\n    }\n    \n    int[] newNo = new int [n+1];\n    newNo[0] = 1;\n    \n    return newNo;\n   }\n}\n```
[]