Skip to content

[generate pascal && find Pairs]#1176

Open
takchiks wants to merge 1 commit intosuper30admin:masterfrom
takchiks:master
Open

[generate pascal && find Pairs]#1176
takchiks wants to merge 1 commit intosuper30admin:masterfrom
takchiks:master

Conversation

@takchiks
Copy link

No description provided.

@super30admin
Copy link
Owner

Your solution for generating Pascal's triangle is correct and efficient. The approach of building each row by using the previous row is optimal, and the code is clear. However, note that the problem only requires the Pascal's triangle solution. The presence of the findPairs method in the same file is unnecessary for this problem and might be confusing. In a real interview setting, you should focus on the problem at hand and avoid including unrelated code.

Additionally, while your comments on time and space complexity are correct, ensure that you specify the complexity for the Pascal's triangle method only in the context of this problem. The space complexity is O(1) auxiliary space, but the output itself uses O(n^2) space, which is inherent to the problem.

Keep up the good work! Your solution demonstrates a solid understanding of the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants