looking for two indices whose value add to target n
o(n^2)
def quad_find(s, n):
slen = len(s)
for i in range(slen):
for j in range(slen-1):
if s[i] + s[j+1] == n:
return (i, j+1)
return None
In the provided Python function, 's' represents a list and '...
kyrie.hashnode.dev1 min read