rewrite leetcode pascal triangle ii