---
title: "Discussion on \"Pascal's Triangle [ Logic + Solution ] in bits\" | Hashnode"
description: "Discussion on \"Pascal's Triangle [ Logic + Solution ] in bits\". Given an integer numRows, return the first numRows of Pascal's triangle.\n\nIn Pascal's triangle, each number is the sum of the two numbers directly above it as shown:\n\n\nInput: numRows = 5 | Output: [[1],[1,1],[1,2,1],[1,3,3,1],[1,4,6,4,1]]\n\nAccording ..."
url: "https://hashnode.com/posts/pascals-triangle-logic-solution-in-bits/630642d0d69cbd5671587fff"
---

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

Discussion

# [Pascal's Triangle \[ Logic + Solution \] in bits](https://tusharmukherjee.hashnode.dev/pascals-triangle-logic-solution-in-bits?utm_source=hashnode&utm_medium=feed)

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

Aug 24, 2022 · 3 min read · tusharmukherjee.hashnode.dev  
Read the article

-   [#leetcode](https://hashnode.com/tag/leetcode)
-   [#leetcode-solution](https://hashnode.com/tag/leetcode-solution)
-   [#pascals-triangle](https://hashnode.com/tag/pascals-triangle)
-   [#dsa](https://hashnode.com/tag/dsa)
-   [#cpp](https://hashnode.com/tag/cpp)

## Written by

[Tushar Mukherjee](https://hashnode.com/@tusharmukherjee)

@tusharmukherjee · India

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
