Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print Pascal's Triangle #42

Open
Chitresh-code opened this issue Oct 19, 2023 · 8 comments
Open

Print Pascal's Triangle #42

Chitresh-code opened this issue Oct 19, 2023 · 8 comments
Assignees
Labels
good first issue Good for newcomers hacktoberfest Hacktoberfest Issue hacktoberfest-2023 Hacktoberfest 2023 Issue hacktoberfest-accepted Accepted for Hacktoberfest Java Java Programming Language Level: Hard This question is hard python Python Programming Language question Further information is requested

Comments

@Chitresh-code
Copy link
Owner

Write Code in Only One Language (CPP, C, Java, Python)

Give File Name : pascal_triangle ✅ In respective language folder

📑 DESCRIPTION

Pascal's Triangle

Difficulty

Problem Statement:
You are given an integer ‘N’. You need to return the first ‘N’ rows of Pascal’s triangle.

Example

Input:
N = 4
Output:
1
1 1
1 2 1
1 3 3 1
Explanation: The output matrix has the first four rows of Pascal’s Triangle. 

Input Format:

The first line of the input will contain an integer ‘N’. 

Output Format:

Print the first ‘N’ rows of Pascal’s Triangle.

Sample Input 1

5

Sample Output 1

1
1 1
1 2 1
1 3 3 1
1 4 6 4 1

Explanation of Sample Input 1

Input:
N = 5

Output:
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
Explanation: The output matrix has the first five rows of Pascal’s Triangle.

Sample Input 2

3

Sample Output 2

1 
1 1
1 2 1

Constraints

1 <= N <= 30
Time Limit: 1 sec

What is Pascal's Triangle?

@Chitresh-code Chitresh-code added good first issue Good for newcomers question Further information is requested hacktoberfest Hacktoberfest Issue hacktoberfest-2023 Hacktoberfest 2023 Issue hacktoberfest-accepted Accepted for Hacktoberfest python Python Programming Language C++ C++ Programming Language Java Java Programming Language Level: Hard This question is hard labels Oct 19, 2023
@Chetan-KH511
Copy link

assign me

1 similar comment
@Anjali0109
Copy link

assign me

@awsmdeep
Copy link
Contributor

hey @Chitresh-code i hope ur doing well ,can uu assign me this work

@Chitresh-code
Copy link
Owner Author

@awsmdeep @Anjali0109 @Chetan-KH511 assigned it to you

@Chitresh-code Chitresh-code linked a pull request Oct 19, 2023 that will close this issue
@lilmistake lilmistake removed the C++ C++ Programming Language label Oct 19, 2023
@Somil-Shukla
Copy link
Contributor

please assign this issue to me

@Shreshth-Srivastava
Copy link

@Chitresh-code
Hey there, I would like to contribute to this repository so could you please assign this issue to me.

@AshaHolla
Copy link

I would like to work on this, pls assign to me

@Pankaj4152
Copy link

@Chitresh-code Can you please assign this to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers hacktoberfest Hacktoberfest Issue hacktoberfest-2023 Hacktoberfest 2023 Issue hacktoberfest-accepted Accepted for Hacktoberfest Java Java Programming Language Level: Hard This question is hard python Python Programming Language question Further information is requested
Projects
None yet
Development

No branches or pull requests

9 participants