⚙️ Rotating Gear Runes
Rotate strings left or right and watch the gears turn
String
K steps
Setup Gears
Original:
↻
Rotate by K
↺
Rotated:
◀ Rotate Left
Reset
Rotate Right ▶
📊 Index Mapping (old → new)
✨ Result
-
🔮 Rotation Formulas
Left Rotate: newIndex = (i - k + n) % n
Right Rotate: newIndex = (i + k) % n