Last active
April 7, 2018 02:34
Revisions
-
nickbalestra revised this gist
Apr 7, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ * Input: nums = [2, 7], target = 9, * Output: [0, 1] // Because nums[0] + nums[1] = 2 + 7 = 9, * * Follow-up: What will change if the given array of integers is sorted * */ -
nickbalestra revised this gist
Apr 7, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,7 +8,7 @@ * and you may not use the same element twice. * * Example: * Input: nums = [2, 7], target = 9, * Output: [0, 1] // Because nums[0] + nums[1] = 2 + 7 = 9, * * Follow-up: What will change if the array of integers will be given sorted -
nickbalestra created this gist
Apr 7, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ /* * Two Sum * * Given an array of integers, return indices of the two numbers * such that they add up to a specific target. * * You may assume that each input would have exactly one solution, * and you may not use the same element twice. * * Example: * Input: nums = [2, 7, 11, 15], target = 9, * Output: [0, 1] // Because nums[0] + nums[1] = 2 + 7 = 9, * * Follow-up: What will change if the array of integers will be given sorted * */ const twoSum = (nums, target) => {}; module.exports = twoSum; This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ const twoSum = require('./twoSum')