Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error decoding response body #99

Open
LegendaryPredz opened this issue Oct 16, 2022 · 3 comments
Open

Error decoding response body #99

LegendaryPredz opened this issue Oct 16, 2022 · 3 comments

Comments

@LegendaryPredz
Copy link

~ leetcode test 1
[INFO  leetcode_cli::plugins::leetcode] Sending code to judge...
error: error decoding response body: expected value at line 2 column 1, please try again
@wendajiang
Copy link
Collaborator

Can you offer your problem 1 code ?

@LegendaryPredz
Copy link
Author

class Solution:
    def twoSum(self, nums: List[int], target: int) -> List[int]:
        map = {}
        for i in range(len(nums)):
            if nums[i] not in map:
                map[target - nums[i]] = i + 1 
            else:
                return [map[nums[i]], i + 1]
            return -1, -1

@wendajiang
Copy link
Collaborator

You can try using the newest version. I can not reproduct the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants