The Mindscaping Inc.
Monday, December 28, 2015
119. Pascal's Triangle II
Given an index
k
, return the
k
th
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?
Java Code:
No comments:
Post a Comment
Newer Post
Older Post
Home
View mobile version
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment