@@ -0,0 +1,647 @@
+package LeetCode.Java;%0A%0A/**%0A * Created by Vonzpf on 17/4/18.%0A */%0A/**-------------------------Title---------------------------------%0A Given an array containing n distinct numbers taken from 0, 1, 2, ..., n,%0A find the one that is missing from the array.%0A%0A For example,%0A Given nums = %5B0, 1, 3%5D return 2.%0A%0A Note:%0A Your algorithm should run in linear runtime complexity.%0A Could you implement it using only constant extra space complexity?%0A */%0Apublic class MissingNumber %7B%0A    public int missingNumber(int%5B%5D nums) %7B%0A        int sum = nums.length;%0A        for (int i = 0; i %3C nums.length; i++)%0A            sum += i - nums%5Bi%5D;%0A        return sum;%0A    %7D%0A%7D%0A

268.Missing Number