From 59813bed8338ba6834c491ae91c6cae968cb2225 Mon Sep 17 00:00:00 2001 From: devenperez <63876261+devenperez@users.noreply.github.com> Date: Mon, 11 Jul 2022 23:35:32 -0400 Subject: [PATCH] Removed "Two Sum" for testing purposes --- 1-two-sum/1-two-sum.js | 14 -------------- 1-two-sum/1-two-sum.py | 11 ----------- 1-two-sum/NOTES.md | 1 - 1-two-sum/README.md | 38 -------------------------------------- 4 files changed, 64 deletions(-) delete mode 100644 1-two-sum/1-two-sum.js delete mode 100644 1-two-sum/1-two-sum.py delete mode 100644 1-two-sum/NOTES.md delete mode 100644 1-two-sum/README.md diff --git a/1-two-sum/1-two-sum.js b/1-two-sum/1-two-sum.js deleted file mode 100644 index 56e2ac7..0000000 --- a/1-two-sum/1-two-sum.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * @param {number[]} nums - * @param {number} target - * @return {number[]} - */ -var twoSum = function(nums, target) { - for(let i = 0; i < nums.length; i++) { - for(let j = i + 1; j < nums.length; j++) { - if(nums[i] + nums[j] == target) { - return [i, j]; - } - } - } -}; \ No newline at end of file diff --git a/1-two-sum/1-two-sum.py b/1-two-sum/1-two-sum.py deleted file mode 100644 index 3e543b6..0000000 --- a/1-two-sum/1-two-sum.py +++ /dev/null @@ -1,11 +0,0 @@ -class Solution(object): - def twoSum(self, nums, target): - """ - :type nums: List[int] - :type target: int - :rtype: List[int] - """ - for i in range(len(nums)): - for j in range(i + 1, len(nums)): - if nums[i] + nums[j] == target: - return [i, j] \ No newline at end of file diff --git a/1-two-sum/NOTES.md b/1-two-sum/NOTES.md deleted file mode 100644 index 38c1374..0000000 --- a/1-two-sum/NOTES.md +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/1-two-sum/README.md b/1-two-sum/README.md deleted file mode 100644 index 2776ef3..0000000 --- a/1-two-sum/README.md +++ /dev/null @@ -1,38 +0,0 @@ -
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.
You may assume that each input would have exactly one solution, and you may not use the same element twice.
- -You can return the answer in any order.
- --
Example 1:
- -Input: nums = [2,7,11,15], target = 9 -Output: [0,1] -Explanation: Because nums[0] + nums[1] == 9, we return [0, 1]. -- -
Example 2:
- -Input: nums = [3,2,4], target = 6 -Output: [1,2] -- -
Example 3:
- -Input: nums = [3,3], target = 6 -Output: [0,1] -- -
-
Constraints:
- -2 <= nums.length <= 104-109 <= nums[i] <= 109-109 <= target <= 109-Follow-up: Can you come up with an algorithm that is less than
O(n2) time complexity?