MCPcopy Create free account
hub / github.com/LjyYano/LeetCode / rotate

Method rotate

src/main/java/L0189_RotateArray.java:34–43  ·  view source on GitHub ↗

使用反转数组的方法 1. 首先反转整个数组 2. 然后反转前 k 个元素 3. 最后反转剩余的元素

(int[] nums, int k)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

mainMethod · 0.95

Calls 1

reverseMethod · 0.95

Tested by

no test coverage detected