Return the maximum of two cases : ( 1 ) nth item included ( 2 ) not included
else return max ( $ val [ $ n - 1 ] + knapSack ( $ W - $ wt [ $ n - 1 ] , $ wt , $ val , $ n - 1 ) , knapSack ( $ W , $ wt , $ val , $ n -1 ) ) ; }