@@ -0,0 +1,421 @@
+public class GetGroupSum %7B%0A%09/**%0A%09 * http://www.crazyforcode.com/sum-elements-array-sum-equal-number/%0A%09 */%0A%09public boolean hasGroupSum(int%5B%5D nums, int target) %7B%0A%09%09int sum = nums%5B0%5D;%0A%09%09int start = 0;%0A%09%09for (int end = 1; end %3C nums.length; end++) %7B%0A%09%09%09while (sum %3E target && start %3C end) %7B%0A%09%09%09%09sum -= nums%5Bstart%5D;%0A%09%09%09%09start++;%0A%09%09%09%7D%0A%09%09%09if (sum == target) %7B%0A%09%09%09%09return true;%0A%09%09%09%7D%0A%09%09%09sum += nums%5Bend%5D;%0A%09%09%7D%0A%09%09return false;%0A%09%7D%0A%7D%0A

Find sub-array whose sum equal to a given number