Skip to content

Instantly share code, notes, and snippets.

View sarahbkim's full-sized avatar

sarahbkim sarahbkim

View GitHub Profile
@sarahbkim
sarahbkim / find_sum.py
Created November 10, 2018 08:23
scratch paper
import unittest
def has_pair_with_sum(a_list, target):
if len(a_list) < 2:
return False
i, j = 0, len(a_list) - 1
while i < j:
min_value = a_list[i]