how to solve this problem ??please provide me some hint
Pascals triangle
Approach for solving this problem -
Although the algorithm is very simple, the iterative approach to constructing Pascal’s triangle can be classified as dynamic programming because we construct each row based on the previous row.
First, we generate the overall triangle list, which will store each row as a sublist. Then, we check for the special case of 00, as we would otherwise return [1][1]. If numRows > 0numRows>0, then we initialize triangle with [1][1] as its first row, and proceed to fill the rows
For more reference google the question or for code see this issue. Pascals triangle
This has code also.
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.