---
title: "Comment by Thirumalai on \"The most helpful thing with the modulo operator\" | Hashnode"
description: "this is helpful for the rotation of arrays too where we do int[] temp = temp[(i + rotations) % arr.length] = arr[i] Sorry, I have used Java im super comfortable"
url: "https://hashnode.com/posts/the-most-helpful-thing-with-the-modulo-operator/6614d92b9b0929be4e0cc3d0/comment/6614f09059736219ea279a83"
---

[Discussion](https://hashnode.com/posts/the-most-helpful-thing-with-the-modulo-operator/6614d92b9b0929be4e0cc3d0)

Comment [The most helpful thing with the modulo operator](https://hashnode.com/posts/the-most-helpful-thing-with-the-modulo-operator/6614d92b9b0929be4e0cc3d0)

[Thirumalai](https://hashnode.com/@tthirruu)

[Apr 9, 2024](https://hashnode.com/posts/the-most-helpful-thing-with-the-modulo-operator/6614d92b9b0929be4e0cc3d0/comment/6614f09059736219ea279a83)

this is helpful for the rotation of arrays too where we do

int\[\] temp = temp\[(i + rotations) % arr.length\] = arr\[i\]

Sorry, I have used Java im super comfortable with java for problem solving because i have been using this for a year

anyways great blog
