Question looks wrong

  • 0

    The statement of the question looks wrong, the 3rd line of Pascal's Triangle is [1, 2, 1], not [1, 3, 3, 1]'s_triangle
    The code checker makes the same mistake.

    It's the only mistake I have seen in ~60 questions though, nice record leetcode ;)

  • 1

    The statement doesn't say 3rd line, it says k = 3. k starts with 0. (edit) But it does say "Given an index k, return the kth row" so that sounds like k = 3 would mean the 3rd row. It seems like the intent is that the triangle is 0-indexed, like an array in most languages; but it could be clearer.

  • 0

    @AZanimal Yes exactly, the "k-th row" formulation is the problem, writing (k+1)th would make the statement clearer

Log in to reply

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