two_sum Flashcards

1
Q

def two_sum(arr, target)

#find two values in the array that sum to the target.
# have naive solution & time complexity efficients

end

p two_sum([1,2,3,4,5], 7)

A

123123123

How well did you know this?
1
Not at all
2
3
4
5
Perfectly