void compute (int n, double[][] A, double[][] B, double[][] C, double[][] D) { for (int i=0; i < n; i++) { for (int j=0; j < n; j++) { C[i][j] = A[i][j] + B[i][j]; } } for (int i=0; i < n; i++) { for (int j=0; j < n; j++) { for (int k=0; k < n; k++) D[i][j] = D[i][j] + A[i][k] * B[k][j]; } } }
There are several different ways of printing the nodes in a binary tree:
Submission: