Algorithm Evaluation
Two Sum
EasyTarget: 30 Minutes
Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target. Each input has exactly one solution.
Variables
Numbers array, target integer.
Complexity
Desired: O(n) Time, O(n) Space.
Ready to initiate?
The timer starts as soon as you open the editor.
solution.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
CONSOLE: READY
98%
ConfidenceReady to Submit