Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
学号:2023120252,姓名:席鹏轩
修改思路:
1.修正 nums.length() 为 nums.length,因为数组的长度是通过 .length 属性获取的。
2.在条件判断中使用 && 而不是 &。&& 是逻辑与运算符,& 是位与运算符,在条件判断中应该使用 &&。
3.使用 == 而不是 ===。Java 中的比较操作符是 ==。
4.确保 while 循环中的条件正确,并且在 second 和 third 指针重合时退出循环。
5.在枚举 first 和 second 时,跳过重复的元素以避免重复的三元组。