SparxIT interview question

Pascal triangle optimization problem to solve