Last updated 9 months ago
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