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: use the correct key to search the value #33

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

Conversation

hi-shirley
Copy link

@hi-shirley hi-shirley commented Aug 6, 2024

Because it uses the key to search for the entry, it always searches for the first entry’s key instead of the specified k.
If you want me to add an unit test, I'm glad to add it.

public static void main(String[] args) {
        ULLMap<String, Integer> map = new ULLMap<>();
        map.put("Jennie", 24);
        map.put("Rustin", 28);
        System.out.println(map.get("Jennie"));
}

Before I correct this problem, it always prints null. After correction, it prints out 24.

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