Shifting Sub-arrays
CodeChefOpen on judge ↗
Problem Statement Jay has got an array A (1-based indexing) of N integers, and he wants to perform some shifting operations on the array. Each operation can be of 2 types. - [ 1 l r ] modify the array by removing all the elements till index l (i.e., the sub-array A[1..l-1] ) and place them after the element with index r. A[1..l-1] must be preserved.) -->A[1..l-1] must be preserved.) --> - [ 2
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start