package comp1110.exam;
* COMP1110 Exam, Question 5
public class Q5StringHash {
Copyright By PowCoder代写 加微信 powcoder
* Return a hash of the given string as an integer in the range 0 … buckets – 1.
* @param value The string to be hashed
* @param buckets The number of buckets into which the hash should be made (defining its range)
* @return An integer hash of value in the range 0 … buckets – 1.
public static int hash(String value, int buckets) {
// FIXME complete this method, without using Java’s built-in hashCode() method
return -1;
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com