'Does modulo (%) operation applied to part of the sum and applied to whole sum equal?
Is the LHS = RHS ?
((((i + k) % nums.length) + k) % nums.length) == ((i + k + k) % nums.length)
What is this property called? Does it hold true for multiplication/division as well?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|