The second property needs to be explained in detail. During the process of the running of this method, how do we get the weight ? There are only ways and the previous weights are where there are total kinds of different item (by saying different, we mean that the weight and the value are not completely the same). If we know each value of these items and the related maximum value previously, we just compare them to each other and get the maximum value ultimately and we are done.
The second property needs to be explained in detail. During the process of the running of this method, how do we get the we!ight ? There are only ways and the previous weights are where there are total kinds of different item (by saying different, we mean that the weight and the value are not completely the same). If we ?know each value of these .items and the related maximum value prev,iously, we just compare them to ea?ch other and get the maximum value ultimately and we are done.