memoized recursive method to return maximum weight with K as ratio of weight and values
static int maxWeightRec ( int wt [ ] , int val [ ] , int K , HashMap < Point , Integer > hm , int last , int diff ) {