We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Right rotation can be done by changing the '-' sign..
Use [(n+k+i)%n] one in scan function.. and also it is useful to keep in mind ,1 right roation=(n-1)left rotation..
Arrays: Left Rotation
You are viewing a single comment's thread. Return to all comments →
Right rotation can be done by changing the '-' sign.. Use [(n+k+i)%n] one in scan function.. and also it is useful to keep in mind ,1 right roation=(n-1)left rotation..