SHARE
TWEET

Untitled

a guest Apr 25th, 2019 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var twoSum = function(nums, target) {
  2.   for (let i = 0; i < nums.length; i++) {
  3.     var temp = nums[i];
  4.     for (let j = 0; j < nums.length; j++) {
  5.       if(i !== j && temp + nums[j] === target) {
  6.         return [i,j];
  7.       }
  8.     }
  9.   }
  10. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top