private Iterable<int[]> splitArray(int[] arr){
  int len1=arr.length / 2;
  int len2=len1 + arr.length % 2;
  int[] a1=new int[len1];
  int[] a2=new int[len2];
  System.arraycopy(arr,0,a1,0,len1);
  System.arraycopy(arr,len1,a2,0,len2);
  return Arrays.asList(a1,a2);
}

private Iterable < int [ ] > splitArray ( int [ ] arr ) { int len1 = arr . length / 2 ; int len2 = len1 + arr . length % 2 ; int [ ] a1 = new int [ len1 ] ; int [ ] a2 = new int [ len2 ] ; System . arraycopy ( arr , 0 , a1 , 0 , len1 ) ; System . arraycopy ( arr , len1 , a2 , 0 , len2 ) ; return Arrays . asList ( a1 , a2 ) ; }
splits the array into two parts . if array size is odd , then the second part is one element greater than the first one . otherwise , the parts have equal size .
