Skip to content
Embercode
✕
StringsQuick quiz

Hashing and Aho-Corasick

8 questions. Covers Tries and Aho-Corasick.

Questions 1 to 5 of 8

  1. 1. Why is hashing with natural unsigned long long overflow (modulus 2^64) unsafe, even though it is fast?
  2. 2. An AI wrote this hash: the base is 131 and fixed, the modulus is 2^61 - 1, and each product is computed as a * b % MOD in plain unsigned 64-bit arithmetic. It passes a random test. What is the main risk?
  3. 3. Use base 10, no modulus, and the letter codes a = 1, b = 2, c = 3. The string cab reads as 312. What is 312 modulo 7?

    Type a number.

  4. 4. Which practices lower the risk of a wrong hash comparison? Select all that apply.

    Pick every answer that is true.

  5. 5. In the ushers example, the reverse pass adds the count of she into he. Which reason is correct?

5 question(s) left on this page.

Typed answers ignore extra spaces and, for most questions, capital letters.