---
title: "Discussion on \"118. Pascal's Triangle\" | Hashnode"
description: "Discussion on \"118. Pascal's Triangle\". Given an integer numRows, return the first numRows of Pascal's triangle. (link)\nIn Pascal's triangle, each number is the sum of the two numbers directly above it as shown:\n\nExample 1:\nInput: numRows = 5\nOutput: [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1..."
url: "https://hashnode.com/posts/118-pascals-triangle/659a57fb1761daba0f4504f7"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [118\. Pascal's Triangle](https://chetan77.hashnode.dev/118-pascals-triangle?utm_source=hashnode&utm_medium=feed)

Given an integer numRows, return the first numRows of Pascal's triangle. (link) In Pascal's triangle, each number is the sum of the two numbers directly above it as shown: Example 1: Input: numRows = 5 Output: \[\[1\],\[1,1\],\[1,2,1\],\[1,3,3,1\],\[1,4,6,4,1...

Jan 7, 2024 · 2 min read · chetan77.hashnode.dev  
Read the article

-   [#pascals-triangle](https://hashnode.com/tag/pascals-triangle)
-   [#striversa2zdsa](https://hashnode.com/tag/striversa2zdsa)
-   [#leetcode](https://hashnode.com/tag/leetcode)
-   [#leetcode-solution](https://hashnode.com/tag/leetcode-solution)
-   [#arrays](https://hashnode.com/tag/arrays)
-   [#java](https://hashnode.com/tag/java)

## Written by

[Chetan Datta](https://hashnode.com/@chetan77)

@chetan77 · Hyderabad, India

  
[View profile](https://hashnode.com/@chetan77)

Software Engineer

I share my learnings here. Thanks for reading.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
