Previous Next
0 / 23
Module DEMO-32-108DEMO-C-32

Rotate Left

DEMO-C-32 โ€ข Programming in C

Browser-only practice

Problem Statement

Write a program that rotates the characters of a string to the left by K positions.

Constraints

Max string length: 100

Input Format

Input:

S K

Output Format

Output:

Rotated

Sample Testcases

Submit runs every public testcase in this browser. Results and code never leave this device.

Sample #1
Public sample
python 1
ythonp
Rotating python left by 1 positions gives ythonp.
Sample #2
Public sample
feature 1
eaturef
Rotating feature left by 1 positions gives eaturef.
Sample #3
Public sample
yam 1
amy
Rotating yam left by 1 positions gives amy.
Sample #4
Public sample
enum 1
nume
Rotating enum left by 1 positions gives nume.

Web terminal

C, C++, Java, and Python run locally in a browser VM. No worker or visualizer is used.

Saved in this browser
Editor settings