mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2026-02-23 15:14:44 +01:00
Fixing memory challenges, naming, testing mini-agi, smooth retrieval scaling (#166)
This commit is contained in:
13
agbenchmark/challenges/code/d1_debug/artifacts_in/code.py
Normal file
13
agbenchmark/challenges/code/d1_debug/artifacts_in/code.py
Normal file
@@ -0,0 +1,13 @@
|
||||
# mypy: ignore-errors
|
||||
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
|
||||
Reference in New Issue
Block a user