摘要: function rotate(arr, k) { const len = arr.length const step = k % len return arr.slice(-step).concat(arr.slice(0, len - step)) } // rotate([1, 2, 3, 4 阅读全文
posted @ 2022-05-30 11:24 下一秒钟已经不同 阅读(14) 评论(0) 推荐(0) 编辑