Easy to understand cpp code


#1

vector Solution::getRow(int A)
{
vector result;
int x = 1;
for(int i=1; i<=A+1; i++)
{
result.push_back(x);
x = x*(A+1-i)/i;
}
return result;
}


#2

can u please tell the derivation for x?