Download extra_info/266/solution_code.py from TIGER-Lab/ClawBench: direct link, hf CLI and curl.
- Browser
- Download file 300 Bytes
-
https://huggingface.co/datasets/TIGER-Lab/ClawBench/resolve/main/extra_info/266/solution_code.py
- Command line
-
hf download hf://datasets/TIGER-Lab/ClawBench/extra_info/266/solution_code.py
-
curl -L -o solution_code.py https://huggingface.co/datasets/TIGER-Lab/ClawBench/resolve/main/extra_info/266/solution_code.py
300 Bytes
| class Solution: | |
| def twoSum(self, nums: list[int], target: int) -> list[int]: | |
| seen = {} | |
| for i, num in enumerate(nums): | |
| complement = target - num | |
| if complement in seen: | |
| return [seen[complement], i] | |
| seen[num] = i | |
| return [] | |