I have completed my code and it's working for valid inputs. But, I am facing a hard time submitting it. On submitting the code, it says that my code gives out a wrong answer for the input. [0, 4, 3, 0] 0
The test case running here seems to be invalid. There are two answers for this. [1, 1] and [1, 4]. The test case gives the former one while mine gives the latter.
I fail to understand why such input is being used here when the question mentions "You may assume that each input would have exactly one solution."
Any ideas on where should I report this ?
Thanks in advance.
Yes, [1, 1] is an invalid answer. But, again this is the answer coming from the test framework.
Also, don't you think the input test case itself is wrong ? How should I proceed and submit my code ?
(Btw, I just double checked and the submission still fails due to the above)
"this is the answer coming from the test framework."
You mean the "expected answer"? What programming language?
"don't you think the input test case itself is wrong ?"
No. And I thought the test case itself was what we were talking about?
I am sorry for my first comment. I hastily commented without looking much into details.
I just got it right and was able to successfully submit my code.
Thanks once again for pointing out my mistake.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.