two sum leetcode
Hey guys I am having problems with one of the more basic leetcode problems. I don't know how to format code on reddit, but I did a pastebin.
Leetcode is saying my code has surpassed the time limit, what is the more efficient solution? Mine has to iterate a lot.
Basically you have to iterate through a list and find the indices of elements that add up to a target number(obviously with no repeat indices).
Submitted July 15, 2017 at 05:36PM by DerpOfTheAges
via reddit http://ift.tt/2ulUSNL