MCPcopy Create free account
hub / github.com/algorithm004-03/algorithm004-03 / Solution2

Class Solution2

Week 01/id_118/LeetCode_1_118.py:17–28  ·  view source on GitHub ↗

for each number in nums, check if target - number is in nums Time complexity is not great in this solution as nums.index() also has a BigO of O(n), so this is also a nested for loop: -> O(n^2)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

test2Function · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected