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
feat(docs/basic): 添加Java语言代码示例 (#4243) #5477
base: master
Are you sure you want to change the base?
Conversation
he-weilai
commented
Mar 25, 2024
- 我已认真阅读贡献指南 (contributing guidelines) 和社区公约 (code of conduct),并遵循了如何参与页及格式手册页的相应规范。
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
for (int i = 0; i < n; ++i) { | ||
bucket.add(new ArrayList<>()); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
在这里之前是不是需要先清空一下 bucket
🤔
} | ||
for (int i = 1; i <= n; ++i) { | ||
int index = a[i] / bucketSize; | ||
if (index >= n) index = n - 1; // 避免数组越界 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
桶排序假定了
=== "Python" | ||
```python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why Python?