Rotate and Query a Ring
An array is treated as a ring. Process operations: R x rotates the array right by x, L x rotates it left by x, G i prints the element currently at index i. Do not physically move elements.
Constraints
1 <= n, q <= 10^5 0 <= x <= 10^9 0 <= i < n
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.