diff options
Diffstat (limited to 'benchmark/agbenchmark/challenges/deprecated/adapatability/a1_debug/artifacts_in/sample_code.py')
-rw-r--r-- | benchmark/agbenchmark/challenges/deprecated/adapatability/a1_debug/artifacts_in/sample_code.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/benchmark/agbenchmark/challenges/deprecated/adapatability/a1_debug/artifacts_in/sample_code.py b/benchmark/agbenchmark/challenges/deprecated/adapatability/a1_debug/artifacts_in/sample_code.py new file mode 100644 index 000000000..f8c270f34 --- /dev/null +++ b/benchmark/agbenchmark/challenges/deprecated/adapatability/a1_debug/artifacts_in/sample_code.py @@ -0,0 +1,12 @@ +from typing import List, Optional + + +def two_sum(nums: List, target: int) -> Optional[List[int]]: + seen = {} + for i, num in enumerate(nums): + typo + complement = target - num + if complement in seen: + return [seen[complement], i] + seen[num] = i + return None |