ChallengeRocket
  • Challenges
  • Find jobs
  • Candidate Hub
  • Employers / Post a Job
  • Log in
  • Sign up now
Menu
  • Home
  • Challenges
  • Pascal's Triangle

Pascal's Triangle

Pascal's Triangle

Before you start the test, check out our tutorial challenge

~10MIN
Start: Mar 29, 2019
SKILL PRACTICE CHALLENGE
  • Challenge outline
  • Tips
  • Leaderboard
Pascal's Triangle
  • Challenge outline
  • Tips
  • Leaderboard

Challenge overview

Hello and welcome to the next live coding challenge!


Write a function, which returns the flatten version of the Pascal's Triangle of the depth n. What is the Pascal's Triangle, you can read here.



Examples

  • n=3 -> 1 1 1 1 2 1
  • n=4 -> 1 1 1 1 211 3 3 1


Input

  • n - triangle's depth


Output

  • string including the flatten version of the Pascal's Triangle of the depth n with values separated with spaces


Constraints

  • 0 <= n <= 30



You can solve this programming contest in Java, JavaScript, Python, C++ and many more languages. If you want, you can also take part in other Challenges. Below you can find some of them:


  • Roman Numerals
  • The Longest Name For A Prince
  • Sudoku Validator
  • Friday 13th


Have fun and good luck! :)


Did you like this challenge and would like to try your hand at some interesting big programming competitions? Check what’s all over the news in tech world in April 2019 in our article with upcoming IT Conferences, Hackathons and Online Challenges.

By using our site, you agree to challengerocket's use of cookies in accordance with our privacy policy.
ChallengeRocket
Tech talent
Challenges Blog Find jobs Candidate Hub
Companies
Business HR Blog Pricing
Challengerocket
FAQ EU Join Us Contact Us
Copyright © 2023 ChallengeRocket. All rights reserved.
Privacy Terms and Conditions Service status

Log in

Don’t have account?
Create a candidate account
or

Forgot your password?

Log in

Don’t have account?
Create an employer account

Forgot your password?

Create a candidate account

Already have an account?
Log in
or
  • At least 8 characters
  • Uppercase Latin characters
  • Lowercase Latin characters
  • At least one number or symbol

Not a candidate?  Sign up as an employer

Reset your password

Remember your password? Log in Log in for business

Create an employer account

Sign up for free.
Select the best plan to publish job ofers & challenges.

Company name introduced here will be visible on your job ads.
  • At least 8 characters
  • Uppercase Latin characters
  • Lowercase Latin characters
  • At least one number or symbol

Not an employer?  Sign up as a candidate