Recursive to Iterative Pascal's Triangle
问题 I wonder how to convert a recursive function/class to an iterative one. I have made a recursive Pascal's triangle, and now need to compare it to an iterative. public class RecursivePascal extends ErrorPascal implements Pascal { private int n; RecursivePascal(int n) throws Exception { super(n); this.n = n; } public void printPascal() { printPascal(n, false); } public void printPascal(boolean upsideDown) { printPascal(n, upsideDown); } private void printPascal(int n, boolean upsideDown) { if (n