Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.

Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).

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

[2,4]

2+4 = 6

6

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

[2,3]

2+3 = 5

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

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

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

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

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