diff options
author | RossTheRoss <msattr@gmail.com> | 2019-12-11 10:37:30 -0600 |
---|---|---|
committer | RossTheRoss <msattr@gmail.com> | 2019-12-11 10:37:30 -0600 |
commit | ce18b653623b14a6b67cfa3f63cfb7596c796f4a (patch) | |
tree | a388a12fd923f949e6f6140b8c29cc819644bcca /csci1913/Java | |
parent | FIXING A HOLE WHERE THE RAIN GETS IN (diff) | |
download | homework-ce18b653623b14a6b67cfa3f63cfb7596c796f4a.tar homework-ce18b653623b14a6b67cfa3f63cfb7596c796f4a.tar.gz homework-ce18b653623b14a6b67cfa3f63cfb7596c796f4a.tar.bz2 homework-ce18b653623b14a6b67cfa3f63cfb7596c796f4a.tar.lz homework-ce18b653623b14a6b67cfa3f63cfb7596c796f4a.tar.xz homework-ce18b653623b14a6b67cfa3f63cfb7596c796f4a.tar.zst homework-ce18b653623b14a6b67cfa3f63cfb7596c796f4a.zip |
Change hash function to also correct one
Diffstat (limited to 'csci1913/Java')
-rw-r--r-- | csci1913/Java/lab13_strap012.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/csci1913/Java/lab13_strap012.java b/csci1913/Java/lab13_strap012.java index e5ce45d..8645a98 100644 --- a/csci1913/Java/lab13_strap012.java +++ b/csci1913/Java/lab13_strap012.java @@ -16,7 +16,7 @@ class Test private static int hash(String name) { - return (name.charAt(0) + name.charAt(name.length()-1)) * name.length() % 1023; + return ((name.charAt(0) + name.charAt(name.length()-1)) * name.length()) % 255; } public static void main(String [] args) |