← Microsoft questions

Modify string based on index ranges

Filed under Microsoft

Given a string S and indices i and j, perform a cyclic shift: move the prefix [0...i] to the end and the suffix [j...len-1] to the beginning, keeping the middle [i+1...j-1] in place.

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 Microsoft questions

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