From 2d26c0ee13f243d348a404ee89925c55766f705d Mon Sep 17 00:00:00 2001 From: Deven <63876261+devenperez@users.noreply.github.com> Date: Tue, 12 Jul 2022 00:18:36 -0400 Subject: [PATCH] Create README - LeetHub --- 1-two-sum/README.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 1-two-sum/README.md diff --git a/1-two-sum/README.md b/1-two-sum/README.md new file mode 100644 index 0000000..2776ef3 --- /dev/null +++ b/1-two-sum/README.md @@ -0,0 +1,38 @@ +

1. Two Sum

Easy


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:

+ + + +

 

+Follow-up: Can you come up with an algorithm that is less than O(n2time complexity?
\ No newline at end of file