```python
def right_rotate(arr, n, out_of_place, cur):
    """
    Right rotates the subarray arr[out_of_place...cur].
    """
    element_to_move = arr[cur]
    
    # Shift elements from out_of_place to cur-1 one position to the right
    for i in range(cur, out_of_place, -1):
        arr[i] = arr[i - 1]
        
    # Place the element from original cur index to the out_of_place index
    arr[out_of_place] = element_to_move

```