can anybodu tell where am i making mistake
Pascal triangle 628
@neeleshr628
Apart from the couple of compilation errors in your code , make these changes as well.
-
In solve function , call the constructor for ans vector .
vector<vector >ans(A);
-
For the second else if block else if(A==2) , make it a if block only with condition
if(A>=2)
Also , remove the return ans statement from this block. This is because if A is greater than two , the third block requires the second block to be executed or the third one cannot function.
3.Change third block’s condition to
if(A>=3)
Remove the syntax errors and make these changes. It should work fine.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.