public class LeetCode{
	public static int trailingZeroes(int n) {      
        int res = 0;

        int t = n;
        while(t != 0 && t / 5 >= 1)
        {
            t = t / 5;
            res += t;
        }

        return res;
    }

    public static String convert(String s, int nRows) {
        if(nRows == 1 || s.length() <= nRows)
        {
            return s;
        }
        String[] lines = new String[nRows];
        int[] indexes = new int[s.length()];
        int delta = 2 * (nRows - 1);
        int count = 0;

        // first line
        for(int i = 0; i < s.length(); i += delta)
        {
            indexes[count++] = i;
        }        
        int startIndx = 1;

        if(nRows > 2)
        {
            // body
            while(startIndx < nRows - 1)
            {
                int t = 1;
                for(int i = startIndx; i < s.length() && i > 0 && count < indexes.length; i = (t++) * delta - i)
                {
                    indexes[count++] = i;
                }
                startIndx++;

            }
        }   

        // tail line
        for(int i = nRows - 1; i < s.length(); i += delta)
        {
            indexes[count++] = i;
        }

        // construct the String
        java.lang.StringBuilder rel = new StringBuilder();
        for(int i = 0; i < indexes.length; i++)
        {
            rel.append(s.charAt(indexes[i]));
        }
        return rel.toString();
    }

    public int singleNumber(int[] A) {
        int result = 0; 
        for (int i : A) result ^= i ; 
            return result ; 
    } 

    public static void main(String[] arg)
    {
        int[] x = {1,0,1};
        System.out.println("result = " + singleNumber(x));

    }
}
@@ -16,16 +16,24 @@
 etCode%7B%0A
+%09// 172%0A
 %09public 
@@ -235,32 +235,41 @@
 urn res;%0A    %7D%0A%0A
+    // 6%0A
     public stati
@@ -1466,24 +1466,35 @@
 g();%0A    %7D%0A%0A
+    // 136%0A
     public i
@@ -1763,8 +1763,9 @@
 %0A    %7D%0A%7D
+%0A

Update LeetCode.java