Given an array of integers, find a maximum sum of non-adjacent elements. For example, inputs [1, 0, 3, 9, 2,-1] should return 10 (1 + 9).
package abc;
public class Solution {
// int[] A{1,4,5,2,5,4,2}
public int nonAdjacentMaxSumRepeated(int[] inpArray) { int[] a = new int[inpArray.length]; int k=0; for(int i=0,j=0;i
}