File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
c-sharp/Problems/arrays-and-hashing Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 4
4
**
5
5
* Given an array of integers nums and an integer target,
6
6
* return indices of the two numbers such that they add up to target.
7
- * You may assume that each input would have exactly one solution, and you may not use the same element twice.
7
+ *
8
+ * You may assume that each input would have exactly one solution,
9
+ * and you may not use the same element twice.
8
10
*
9
11
* You can return the answer in any order.
10
12
*
22
24
* Output: [0,1]
23
25
*
24
26
* Constraints:
25
- * • 2 <= nums.length <= 104
26
- * • -109 <= nums[i] <= 109
27
- * • -109 <= target <= 109
27
+ * • 2 <= nums.length <= 10^4
28
+ * • -10^9 <= nums[i] <= 10^9
29
+ * • -10^9 <= target <= 10^9
28
30
* • Only one valid answer exists.
29
31
*
30
32
* Follow-up: Can you come up with an algorithm that is less than O(n2) time complexity?
You can’t perform that action at this time.
0 commit comments