SparxIT Interview Question

Pascal triangle optimization problem to solve