当前位置: 代码迷 >> 综合 >> Pascal's Triangle II leetcode
  详细解决方案

Pascal's Triangle II leetcode

热度:54   发布时间:2024-01-14 06:29:44.0

Given an index k, return the kth row of the Pascal's triangle.

For example, given k = 3,
Return [1,3,3,1].

Note:
Could you optimize your algorithm to use only O(k) extra space?