topic118

package
v0.0.0-...-b071cee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2023 License: GPL-3.0 Imports: 0 Imported by: 0

README

118.杨辉三角

1. 题目描述

给定一个非负整数  numRows 生成「杨辉三角」的前  *numRows  * 行。

在「杨辉三角」中,每个数是它左上方和右上方的数的和。

 

示例 1:


输入: numRows = 5
输出: [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1]]

示例 2:


输入: numRows = 1
输出: [[1]]

 

提示:

  • 1 <= numRows <= 30

标签 数组 动态规划

2. 解题

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL