LeetCode OJ
Problems
Pick One!
Submissions
Sign up
Sign in
Plus One
AC Rate: 1350/4406
My Submissions
Given a number represented as an array of digits, plus one to the number.
C++
Java
class Solution { public: vector<int> plusOne(vector<int> &digits) { // Note: The Solution object is instantiated only once and is reused by each test case. } };
public class Solution { public int[] plusOne(int[] digits) { // Note: The Solution object is instantiated only once and is reused by each test case. } }
Submit Solution
You have not signed in, cannot submit your code.
Submit failed, try again please.
You have attempted to resubmit too soon. Please resubmit in a moment.
Send Feedback