MCPcopy Create free account
hub / github.com/das-jishu/data-structures-basics-leetcode / pair_sum

Function pair_sum

Arrays/array-pair-sum.py:2–37  ·  view source on GitHub ↗

APPROACH USING DICTIONARY count = {} k = 0 for x in li: count[k] = x k += 1 print(type(count.values())) result = [] for x in count.values(): if (sum - x) in count.values(): print('Found: [',x,' ',(sum-x),']')

(li, sum)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

array-pair-sum.pyFile · 0.85

Calls 1

addMethod · 0.80

Tested by

no test coverage detected