---
title: "Discussion on \"118. Pascal's Triangle\" | Hashnode"
description: "Discussion on \"118. Pascal's Triangle\". [A1] - Brute Force\nTime: O(n^2)\nSpace: O(n^2)\nclass Solution:\n    def generate(self, numRows: int) -> List[List[int]]:\n        # Initialize the triangle with the first row\n        pascal_triangle = []\n\n        for i in range(numRows):\n            # S..."
url: "https://hashnode.com/posts/118-pascals-triangle/671bacb1f5e48039dd63942e"
---

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

Discussion

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

\[A1\] - Brute Force Time: O(n^2) Space: O(n^2) class Solution: def generate(self, numRows: int) -> List\[List\[int\]\]: # Initialize the triangle with the first row pascal\_triangle = \[\] for i in range(numRows): # S...

Oct 25, 2024 · 1 min read · blog.debjotyms.com  
Read the article

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

## Written by

[Debjoty Mitra](https://hashnode.com/@debjotyms)

@debjotyms · Dhaka, Bangladesh

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

Machine Learning Enthusiast

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
