degree of a polynomial using a table