Class Solution
java.lang.Object
g0101_0200.s0118_pascals_triangle.Solution
118 - Pascal’s Triangle.<p>Easy</p>
<p>Given an integer <code>numRows</code>, return the first numRows of <strong>Pascal’s triangle</strong>.</p>
<p>In <strong>Pascal’s triangle</strong> , each number is the sum of the two numbers directly above it as shown:</p>
<p><img src="https://upload.wikimedia.org/wikipedia/commons/0/0d/PascalTriangleAnimated2.gif" alt="" /></p>
<p><strong>Example 1:</strong></p>
<p><strong>Input:</strong> numRows = 5</p>
<p><strong>Output:</strong> [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1]]</p>
<p><strong>Example 2:</strong></p>
<p><strong>Input:</strong> numRows = 1</p>
<p><strong>Output:</strong> <a href="1">1</a></p>
<p><strong>Constraints:</strong></p>
<ul>
<li><code>1 <= numRows <= 30</code></li>
</ul>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
generate
-