Can anyone explain me this question: Two Sum #11
Answered
by
bibhuti9
bibhutigswain
asked this question in
Q&A
-
Can anyone explain me this Two Sum DSA question |
Beta Was this translation helpful? Give feedback.
Answered by
bibhuti9
May 30, 2024
Replies: 1 comment 1 reply
-
I also have same question @bibhuti9 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The given problem is attempting to solve the classic "Two Sum" problem using JavaScript. In the "Two Sum" problem, you are given an array of integers (nums) and a target integer (target). Your goal is to find two different indices in the array such that the numbers at those indices add up to the target. You should return these indices in an array.
Here’s the provided code and an explanation of why it doesn’t work as intended: