1. Two Sum
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 thesame element twice.
You can return the answer in any order.
Input Format
nums seperated by spacetargetOutput Format
Sample Input
3
2 7 11 15
9
3 2 4
6
3 3
6
2 7 11 15
9
3 2 4
6
3 3
6
Sample Output
0 1
1 2
0 1
1 2
0 1
Constraints:
2 ≤ nums.length ≤ 10-10 ≤ nums[i] ≤ 10-10 ≤ target ≤ 10Submission Info
User Accepted
19509
User Tried
19509
Total Accepted
19509
Total Submissions
19509
Difficulty
Easy
Python
Dark
14