/**
 * 
 */
package com.wangsus.codetest.difficulty1;

/**
 * @author Su
 * 
 *         Given a non-negative number represented as an array of digits, plus
 *         one to the number.
 * 
 *         The digits are stored such that the most significant digit is at the
 *         head of the list.
 */
public class Plus_One {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub

	}
	public class Solution {
	    public int[] plusOne(int[] digits) {
	        return null;
	    }
	}
}

@@ -430,16 +430,17 @@
 tub%0A%0A%09%7D%0A
+%0A
 %09public 
@@ -457,20 +457,17 @@
 tion %7B%0A%09
-    
+%09
 public i
@@ -500,34 +500,321 @@
  %7B%0A%09
-        return null;%0A%09    
+%09%09boolean needUp = false;%0A%09%09%09for (int i = 0; i %3C digits.length; i++) %7B%0A%09%09%09%09if (i == 0) %7B%0A%09%09%09%09%09digits%5Bi%5D = digits%5Bi%5D + 1;%0A%09%09%09%09%7D%0A%09%09%09%09if (needUp) %7B%0A%09%09%09%09%09digits%5Bi%5D = digits%5Bi%5D + 1;%0A%09%09%09%09%09needUp = false;%0A%09%09%09%09%7D%0A%09%09%09%09if (digits%5Bi%5D %3E= 10) %7B%0A%09%09%09%09%09digits%5Bi%5D = digits%5Bi%5D-10;%0A%09%09%09%09%09needUp = true;%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%09return digits;%0A%09%09
 %7D%0A%09%7D

plusOne wrong