2.Pascal's Triangle
Given a non-negative integer numRows, generate the first numRows of Pascal's triangle.
Time Complexity: O(N ^ 2) Space Complexity: O(N ^ 2)
Pascal's Triangle II
Given an integer rowIndex
, return the rowIndexth
row of the Pascal's triangle.
Time Complexity: O(N ^ 2) Space Complexity: O(N)
Last updated