Moody's Interview Question

Pascals triangle algorithm