top of page

Looking to master object-oriented and system design for tech interviews or career growth?

  • Improve your system design and machine coding skills.

  • Study with our helpful resources.

  • Prepare for technical interviews and advance your career.

**We're in beta mode and would love to hear your feedback.

Writer's pictureilluminati

Kth Row of Pascal's Triangle Interviewbit Solution


Problem Description:

Given an index k, return the kth row of the Pascal’s triangle.

Pascal’s triangle : To generate A[C] in row R, sum up A’[C] and A’[C-1] from previous row R - 1.


Example:

Input : k = 3  
Return : [1,3,3,1]

Note : k is 0 based. k = 0, corresponds to the row [1].

Solution:


Comments


bottom of page