solution for generating Pascal's Triangle
solution for Pascal's Triangle II, using linear extra space