← Deutsche Bank questions

Rotate string left and right

Filed under Deutsche Bank

Given a string s and two integers left and right, return the string after rotating it left by 'left' positions and right by 'right' positions. The net rotation is (left - right) % length(s).

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Deutsche Bank questions

Collected from public candidate posts and coding forums. Updated Nov 2026.