Dynamic programming algorithm for Knapsack is stated to have complexity $\mathcal O (nW)$.
However, I've also seen the complexity stated as $\mathcal O (n^2V)$, where $V=\max v_i$.
(Here $n$ is the number of items and $W$ the weight limit).
I see from the algorithm that the first complexity measure is correct: http://en.wikipedia.org/wiki/Knapsack_problem
Can someone tell me, why the other complexity measure works ?