GoConqr has a new look! Let us know what you think.

Notes

Untitled

Jainner Salcedo Sanchez Informática Spanish 1 page

Content of the notes (1)

Page 1

var twoSum = function (nums, target) {

for (let i = 0; i < nums.length; i++) {

for (let j = i + 1; j < nums.length; j++) {

if (nums[j] === target - nums[i]) {

return [i, j];

}

}

}

// Return an empty array if no solution is found

return [];

};

Information

Description
Informática Note on Untitled, created by Jainner Salcedo Sanchez on 14/01/2025.
Created by
Jainner Salcedo Sanchez · Jan 2025
Updated
Jan 14, 2025
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?