Блог пользователя _Shiva_99

Автор _Shiva_99, история, 6 лет назад, По-английски

why this line --> [ while (hash < 0)hash += M;] is used in the solution of this problem

can anyone please help me??

  • Проголосовать: нравится
  • -1
  • Проголосовать: не нравится

»
6 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

I think it is just to make the value of hash between 0 and M-1 as it was earlier subtracted by something and could've gone negative