Last active
June 12, 2020 19:12
-
-
Save NoNews/b3bb74a2c564c2bbb23f4fbaff973152 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int indexOf(Object key, int hash) { | |
... | |
//next available position for our element = 0 | |
//to show, that we don't have this key, will execute ~0, which is equal -1 | |
int index = binarySearchHashes(mHashes, N, hash); | |
if (index < 0) { | |
// hash code not found, "put" operation | |
return index; | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment