⚙️ Rotating Gear Runes

Rotate strings left or right and watch the gears turn

String
K steps
Original:
Rotate by K
Rotated:
📊 Index Mapping (old → new)
✨ Result
-
🔮 Rotation Formulas
Left Rotate: newIndex = (i - k + n) % n
Right Rotate: newIndex = (i + k) % n