human
I am working on the file "02_BinarySearch.ipynb".
The first task is:
Recover Rotated Sorted Array

Given a rotated sorted array, recover it to sorted array in-place.
Example
[4, 5, 1, 2, 3] -> [1, 2, 3, 4, 5]
Can you write Python program for it?

Give me a the Python program you requested?
assistant
#Here is the Python program you requested.

class Solution:
    """
    @param nums: The rotated sorted array
    @return: nothing
    """
    def recoverRotatedSortedArray(self, nums):
        # write your code here
        def rev(nums, start, end):
            for i in range((end - start) / 2 + 1):
                nums[start+i], nums[end-i] = nums[end-i], nums[start+i]
        
        n = len(nums)
        for i in range(n-1):
            if nums[i] > nums[i+1]:
                rev(nums, 0, i)
                rev(nums, i+1, n-1)
                rev(nums, 0, n-1)
                break