Find the Kth Row of Pascal's Triangle Problem Statement

Given a non-negative integer 'K', determine the Kth row of Pascal’s Triangle.

Example:

Input:
K = 2
Output:
1 1
Input:
K = 4
Output:
1 4 6 4 1

Constraints:

  • 1 <= T <= 50
  • 1 <= K <= 50
Note:

You are not required to print anything; it has already been handled. Focus on implementing the function to return the correct output.

Be the first one to answer
Add answer anonymously...
Ola Cabs Software Developer Interview Questions
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter