We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d5cef9d commit fc56819Copy full SHA for fc56819
Data-Structures/Array/2Sum.js
@@ -22,7 +22,7 @@ function twoSum(nums, target) {
22
map.set(nums[i], i);
23
}
24
25
- return null; // No two sum solution
+ return []; // Return an empty array when no solution is found
26
27
28
export { twoSum }
0 commit comments