Wix interview question

pascal triangle question in leetcode