Hackerrank – Pascal’s Triangle

Problem Statement
A description of the problem can be found on Hackerrank.

I created recursive function for factorial


Then create all combinations of rows and column indexes. For input 4 it looks like:

Apply function for pascal triangle

    \[\frac{fact(row)}{fact(column) \times fact(row - column)}\]

for each combination.

I created solution in Scala:
The solution is also available on my GitHub.