Given an integer rowIndex (0-indexed), return the rowIndex-th row of Pascal's Triangle using only O(rowIndex) extra space.
Input: A single integer rowIndex (0-indexed).
Output: Integer array — the rowIndex-th row of Pascal's Triangle.
Input: 3
Output: [1,3,3,1]
Explanation: Row 0:[1], Row 1:[1,1], Row 2:[1,2,1], Row 3:[1,3,3,1].
Each inner element = sum of two elements above it.Input: 0
Output: [1]
Explanation: Row 0 is the apex of Pascal's Triangle — just [1].Input: 4
Output: [1,4,6,4,1]
Explanation: Row 4 = [1, 1+3, 3+3, 3+1, 1] = [1,4,6,4,1].0 <= rowIndex <= 33