MCPcopy Create free account
hub / github.com/aylei/leetcode-rust / Solution

Class Solution

src/solution/s0189_rotate_array.rs:34–34  ·  view source on GitHub ↗

* [189] Rotate Array * * Given an array, rotate the array to the right by k steps, where k is non-negative. * * Example 1: * * * Input: [1,2,3,4,5,6,7] and k = 3 * Output: [5,6,7,1,2,3,4] * Explanation: * rotate 1 steps to the right: [7,1,2,3,4,5,6] * rotate 2 steps to the right: [6,7,1,2,3,4,5] * rotate 3 steps to the right: [5,6,7,1,2,3,4] * * * Example 2: * *

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected