Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle.
Note that the row index starts from 0.
跟上一题没啥区别,就是只输出一行。
那就得到矩阵之后,输出最后一行呗。会不会太多此一举~

本文介绍了一个简单的算法,用于求解帕斯卡三角形的第K行,其中K是一个非负整数且不大于33。该算法通过构建矩阵并返回最后一行来实现目标。
Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle.
Note that the row index starts from 0.
跟上一题没啥区别,就是只输出一行。
那就得到矩阵之后,输出最后一行呗。会不会太多此一举~


被折叠的 条评论
为什么被折叠?