How does the modulo operation affects the time complexity of a program ?

Правка en1, от codemode, 2019-07-08 09:10:03

Say, I have an O(n^2) or O(n^3) solution to a problem . If I use the modulo operator in most of the statements inside the loops, will my program slow down ? With which factor will it slow down ? like 2*x,3*x,.. ? (if "x" is the execution time of the program when no modulo is used)

Теги modulo

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский codemode 2019-07-08 09:10:03 356 Initial revision (published)