Testing case: Input: [3,2,4], 6 and Expected: [2,3]??


  • 0
    V

    Well, my out put is [2,4] and that 2+4 = 6 which is the target number 6

    However, the expected result is [2,3] and 2+3 = 5 not target number.

    Hope admin looks at this testing case because my answer keeps rejected.


  • 0
    C

    the problem is:"The function twoSum should return indices of the two numbers such that they add up to the target", focus at "indices"


  • 0
    V

    Is output [2, 3] also correct for Input: [3,2,4], target 6?


  • 0

    Quote: Please note that your returned answers (both index1 and index2) are not zero-based.


Log in to reply
 

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