title: groupsumClump Problem
body: <p>Im struggling to get the below problem right for a quite a while sometime.</p>
  
  <p>Given an array of ints, is it possible to choose a group of some of the ints, such that the group sums to the given target, with this additional constraint: if there are numbers in the array that are adjacent and the identical value, they must either all be chosen, or none of them chosen. For example, with the array {1, 2, 2, 2, 5, 2}, either all three 2's in the middle must be chosen or not, all as a group. (one loop can be used to find the extent of the identical values). </p>
  
  <pre><code>  groupSumClump(0, {8, 2, 2, 1}, 9) → true      
    groupSumClump(0, {2, 4, 4, 8}, 14) → false     
  </code></pre>
  
  <p>The code is at <a href="http://ideone.com/Udk5q" rel="nofollow">http://ideone.com/Udk5q</a></p>
  
  <p>Failing test case scenarios:</p>
  
  <pre><code> groupSumClump(0, {2, 4, 4, 8}, 14) → false --&gt;NegativeArraySizeException
   groupSumClump(0, {8, 2, 2, 1}, 9) → true false --&gt; X
  </code></pre>
  
  <p>i have really tried my best to make it work but alas its failing always.
  Please Need your help SO experts to resolve this problem
  I will be highly obliged and thankful to you,if you can spare a few minutes to look into my problem as well and help me in acheieving the desired solution.</p>