0

Given integer n, return the first n row of pascal triangle?

What is wrong is this?? It can't run??? https://code.sololearn.com/c2l5jhfxJNcZ/?ref=app

20th Aug 2023, 6:02 PM
Anuj Khare
Anuj Khare - avatar
1 Odpowiedź
0
I know it's not much, but I'm thinking it has something to do with your vectors, idk much about c++ but from a little reading it looks like you need to use a method like insert() or push_back() to actually add the values to it. If I were working on this, I'd probably try inserting or pushing an empty integer vector on your primary vector, then you could possibly use bracket notation to push integers onto the sub vector PrimaryVector[0].insert(integer) This is all hypothetical and I don't know much about C++ but like I said, I checked out stack overflow and the inserting of values into the vector seems like the problem
23rd Aug 2023, 7:00 PM
StealthyTaco
StealthyTaco - avatar