Knapsack01 problem, written in c# Is this code written in a decent style? Appreciate some feedback : )

private static int Max(int a, int b)
{
    return a &gt; b ? a : b;
} 

/// &lt;summary&gt;
/// Returns the solution to Knapsack01 problem. Uses bottom up dynamic programming.
/// &lt;/summary&gt;
private static int Knapsack01(int capacity, int[] values, int[] weights)
{
    int[,] table = new int[values.Length + 1, capacity + 1];


    for (int row = 0; row &lt;= values.Length; row++)
    {
        for (int column = 0; column &lt;= capacity; column++)
        {
            if (row == 0 || column == 0)
            {
                // base case
                table[row, column] = 0;
            }

            else if (weights[row -1] &lt;= column)
            {
                // item fits 
                int valueAbove = table[row - 1, column];
                int spareCapacity = column - weights[row - 1];
                int currentValue = values[row - 1] + table[row - 1, spareCapacity];
                table[row, column] = Max(valueAbove, currentValue);
            }

            else
            {
                // item doesn't fit so copy value from above cell
                table[row, column] = table[row - 1, column];
            }
        }
    }

    return table[values.Length, capacity];
}
It's not exactly well-documented. You can sort of determine what the "Knapsack problem" is by looking at a few comments and some variable names, but if I were the developer, I'd probably add a comment block to describe how it works in case someone else came upon this code later and needed to understand it quickly.

I'm not quite sure why they didn't just use Math.Max instead of creating their own function (maybe they ported it from some other language that didn't have that function handy?).

Aside from those things, if it's functional and returns accurate results, then I don't see a huge problem with it.