title: most efficient way to find a sum of two numbers
body: <p>I am looking into a problem: given an arbitrary list, in this case it is [9,15,1,4,2,3,6], find any two numbers that would sum to a given result (in this case 10). What would be the most efficient way to do this? My solution is n<sup>2</sup> in terms of big O notation and even though I have filtered and sorted the numbers I am sure there is a way to do this more efficiently. Thanks in advance</p>
  
  <pre><code>myList  = [9,15,1,4,2,3,6]
  myList.sort()
  result = 10
  myList = filter(lambda x:x &lt; result,myList)
  total = 0
  for i in myList:
      total = total + 1
      for j in myList[total:]:
          if i + j == result:
              print i,j
              break
  </code></pre>