Given an integer `rowIndex`, return the `rowIndex`th (**0-indexed**) row of the **Pascal's triangle**. In **Pascal's triangle**, each number is the sum of the two numbers directly above it.
Example 1
Input: rowIndex = 3
Output: [1,3,3,1]
Explanation: Rows 0 to 3 are [1], [1,1], [1,2,1] and [1,3,3,1]. Each 3 is the sum of the 1 and 2 above it.
Example 2
Input: rowIndex = 0
Output: [1]
Explanation: Row 0 is the single 1 at the top of the triangle.
Example 3
Input: rowIndex = 1
Output: [1,1]
Explanation: Row 1 is [1,1], the two edges below the top 1.
Row r of Pascal's triangle is built from row r-1: each interior entry is the sum of the two entries above it. Update a single array in place from right to left so each addition uses the still-un-overwritten previous-row values.
Run checks all cases above. Submit evaluates all test cases.