We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
原题链接:https://leetcode-cn.com/problems/rotate-array/solution/189-xuan-zhuan-shu-zu-popunshiftyi-xing-javascript/
解题思路:
/** * @param {number[]} nums * @param {number} k * @return {void} Do not return anything, modify nums in-place instead. */ var rotate = function (nums, k) { for (let i = 0; i < k; i++) nums.unshift(nums.pop()); };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
原题链接:https://leetcode-cn.com/problems/rotate-array/solution/189-xuan-zhuan-shu-zu-popunshiftyi-xing-javascript/
解题思路:
The text was updated successfully, but these errors were encountered: