leetcode-双指针旋转数组

nums = "----->-->"; k =3
result = "-->----->";

reverse "----->-->" we can get "<--<-----"
reverse "<--" we can get "--><-----"
reverse "<-----" we can get "-->----->"
this visualization help me figure it out :)
posted @ 2021-07-21 22:18  ou尼酱~~~  阅读(122)  评论(0)    收藏  举报