umdreamer / leetcodeproblems

Solutions for LeetCode OJ
3 stars 9 forks source link

2023.05.23 Problem: 119. Pascal's Triangle II #20

Closed umdreamer closed 1 year ago

umdreamer commented 1 year ago
  1. Pascal's Triangle II Problem Link

Given an integer rowIndex, return the rowIndexth (0-indexed) row of the Pascal's triangle.

In Pascal's triangle, each number is the sum of the two numbers directly above it as shown: image

Example 1:

Input: rowIndex = 3
Output: [1,3,3,1]

Example 2:

Input: rowIndex = 0
Output: [1]

Example 3:

Input: rowIndex = 1
Output: [1,1]

Constraints:

Follow up: Could you optimize your algorithm to use only O(rowIndex) extra space?

yeyuxq commented 1 year ago

image

zxm-1235 commented 1 year ago

image

tangyexi commented 1 year ago
屏幕截图 2023-05-23 161055
PinkyLame commented 1 year ago

image

liu-si-han commented 1 year ago
image
zhjingyan commented 1 year ago

image

sjh397 commented 1 year ago

image

Lggg1234 commented 1 year ago

屏幕截图 2023-05-23 124620

daowuwu commented 1 year ago

8C P4U4N9T75NPJ(%JF@TU7

cuixiao02 commented 1 year ago
截屏2023-05-23 19 13 34
huangyumei1 commented 1 year ago

QQ图片20230523200215

FXL1006 commented 1 year ago
image
mafanjia commented 1 year ago

截屏11

xkqwww commented 1 year ago

无标题

naqianqpg commented 1 year ago

B)LY7Y~%$E@TB2A@%6ID6LK

foxbou commented 1 year ago
image
promisewith7 commented 1 year ago

image

1125766961 commented 1 year ago

image

ZWJ2212061008 commented 1 year ago

image

htywan commented 1 year ago

2

bedauern commented 1 year ago
Snipaste_2023-05-23_21-13-13
686xiaozhang commented 1 year ago

QQ截图20230523212453

123lrb commented 1 year ago

T{YFOQE2MEJB 4S_}BVSK6

12baoxingyu-6 commented 1 year ago
image
wangshiqi7 commented 1 year ago
截屏2023-05-22 18 35 51
shylieisme commented 1 year ago

EEM$ $ R0N64H`}Y8$Q$H9R

shylieisme commented 1 year ago

A 0QY_{UN72HJR4LJLH(~YJ

24zlx commented 1 year ago

联想截图_20230523220002

syr2212061031 commented 1 year ago

1_HLR86DL(LCY3FHM_O5_ L

zangfushuo commented 1 year ago
截屏2023-05-23 21 59 57
liuhuanyu6 commented 1 year ago

image

gusuning commented 1 year ago
屏幕截图 2023-05-23 221822
xiaolu2002 commented 1 year ago

image