pascal

Compute the nth row of the pascal triangle

vector<int>pascal(n);

will return the nth row of the pascal triangle, stored in a vector of integers. See below example:

vector<int> test = pascal(3);
for(auto i : test){
    cout << i;
}
//Code above returns: 121
Pascal triangle

Last updated