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

fix: update the implementation of simple_hash.js and .ts #1656

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AsaoOoo0o0o
Copy link

@AsaoOoo0o0o AsaoOoo0o0o commented Feb 11, 2025

The bitwise AND operation does not ensure that the hash value is within an appropriate range. According to the docs, a modulo operation is required here.

Implementations in some other languages ​​have the same issue.

If this pull request (PR) is associated with coding or code transpilation, please attach the relevant console outputs to the PR and complete the following checklist:

  • I have thoroughly reviewed the code, focusing on its formatting, comments, indentation, and file headers.
  • I have confirmed that the code execution outputs are consistent with those produced by the reference code (Python or Java).
  • The code is designed to be compatible on standard operating systems, including Windows, macOS, and Ubuntu.
image

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

Successfully merging this pull request may close these issues.

1 participant