Back to course home
0% completed
Vote For New Content
This one is NOT working on LeetCode. Can someone help me with this please?
ornella
Mar 10, 2022
This one is NOT working on LeetCode. Can someone help me with this please?
1
0
Comments
Comments
Design Gurus4 years ago
What error are you seeing?
J
Jaydip Barvaliya3 years ago
because it will only work for sorted array
Y
Yilay Tian2 years ago
Try this one 167. Two Sum II - Input Array Is Sorted
Soham Mehtaa year ago
Because it needs indices as an answer
when index is to be returned array cannot be sorted and the solution is : Maintain a difference map which will store the difference between element and target
- While traversing check if that element exists in the map or not, if ...
On this page
Problem Statement
Try it yourself