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]
分析:
三步翻转法可以实现rotated
1.recover rotated sorted array
45 123 找到这个位置没必要二分,直接N过来· ->54 321-> 123 45
解法:
Last updated