PPT Slide
 
 
// Yield Pascal's triangle with size rows
public static int[][] calculatePascal(int size) {
    int[][]p= new int[size][];  //the triangle
    // Invariant: rows 0..r-1 have been
    //                  allocated and calculated
    for (int r= 0; r != size; r= r+1) {
        // Allocate row i of triangle --its r+1 values
        // Calculate row r of Pascal's triangle		p[r][0]= 1;
	for (int c= 1; c < r; c= c+1)
	     p[r][c]= p[r-1][c-1] + p[r-1][c];