Fills a 2D table to determine maximum value obtainable without exceeding weight capacity W, tracing back choices.