Home
Blogs
Questions
Jobs
Monetize

Home

About Us

Blogs

Questions

Jobs

Monetize

Post Job

banner

Questions about modular-arithmetic

Read more about modular-arithmetic

python (12.9k questions)

javascript (9.2k questions)

reactjs (4.7k questions)

java (4.2k questions)

java (4.2k questions)

c# (3.5k questions)

c# (3.5k questions)

html (3.3k questions)

Questions - modular-arithmetic

Why is the following code correct for computing the hash of a string?

I am currently reading about the Rabin Karp algorithm and as part of that I need to understand string polynomial hashing. From what I understand, the hash of a string is given by the following formula...
test-img

Arat254

hash

polynomial-math

modular-arithmetic

rabin-karp

Votes: 0

Answers: 1

Latest Answer

Mathematically, there is no reason to reduce intermediate results modulo m. Operationally, there are a couple of very closely related reasons to do it: To keep numbers small enough that they can be r...
test-img

harold

Implementing Modular exponentiation in C++

The following C++ program uses modular exponentiation to compute the quantity ((0.75 + 2.25*(9^((1e+7-2)/2) ))) mod (1e+9+7). This is done using the powxy function, which takes x and y as arguments an...
test-img

Andrew

c++

modular-arithmetic

Votes: 0

Answers: 0

Posts

Questions

Blogs

Jobs

The ultimate platform for coders and IT specialists

About

  • Company
  • Support

  • Platform

  • Terms & Conditions
  • Privacy statement
  • Cookie policy
  • Cookie option
  • OnlyCoders © 2025  |  All rights reserved