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

网站第一章nSum问题中的3Sum的java代码有错误 #1560

Open
2 tasks done
aj-web opened this issue Apr 1, 2024 · 0 comments
Open
2 tasks done

网站第一章nSum问题中的3Sum的java代码有错误 #1560

aj-web opened this issue Apr 1, 2024 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@aj-web
Copy link

aj-web commented Apr 1, 2024

请在提交 bug 之前先搜索

  • 我已经搜索过 issues,没有发现相同的 bug。

出错的题目链接

https://leetcode.cn/problems/3sum/description/

报错信息

第一章:一个方法团灭nSum问题
twoSumTarget方法代码中使用res.add(Arrays.asList(left, right))。asList方法生成的list容量固定。threeSumTarget方法中直接对该list使用add方法报错。leetCode官网的解法代码没有问题,使用res.add(new ArrayList<>(Arrays.asList(left, right)));

你是否愿意提交 PR 修复这个 bug?

  • 我愿意!
@aj-web aj-web added the help wanted Extra attention is needed label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant