题解 | #旋转数组#

旋转数组

https://www.nowcoder.com/practice/e19927a8fd5d477794dac67096862042

class Solution:
    def solve(self , n: int, m: int, a: List[int]) -> List[int]:
        n = n-m%n
        return a[n:]+a[:n]

全部评论

相关推荐

码农顶针:估计让你免费辅导老板孩子的学习
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务