一、题目 给定一个旋转排序数组,在原地恢复其排序。(升序) 样例 Example1: [4, 5, 1, 2, 3] -> [1, 2, 3, 4, 5] Example2: [6,8,9,1,2] -> [1,2,6,8,9] 二、思路: 使用数组排序方法sort()直接排序 三、js代码 const recoverRotatedSortedArray = function (nums) { // write your code here return nums.sort((a,b)=>{return a - b}) }