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
Algorithms > two_sum > Flashcards
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)
123123123