This dp array is used to store our values so that we don 't have to calculate same  values again and again
static int [ ] [ ] [ ] dp = new int [ MAX_INDEX ] [ MAX_SUM ] [ MAX_INDEX ] ; static int waysutil ( int index , int sum , int count , Vector < Integer > arr , int K ) {