Rolling String (For Data Science )

Problem Overview

  • Task: Modify a lowercase string by applying roll operations on specified substrings, shifting letters circularly left (L) or right (R), then return the final string.
  • Input: lowercase string s and n ops (i, j, ch) with 0 ≤ i ≤ j < |s| and ch in {L, R}; constraints: |s| ≤ 150, n ≤ 100; output: final string.
  • Context: Variation of the Caesar Cipher for text processing in data science/string manipulation.
  • This coding interview problem is an IBM interview question.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: