Wrong output in k=5


  • 0
    G
    Submission Result: Wrong Answer
    
    Input:	5
    Output:	[1,6,1,0,5,1]
    Expected:	[1,5,10,10,5,1]
    

    how come my output is incorrect for 5 and how this output comes.Can somebody explain me this?


  • 2
    X
    0|                   1
    1|               1       1
    2|           1       2      1
    3|      1       3        3      1
    4|    1   4        6      4       1
    5|  1  5     10      10     5      1
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.