Problem Description

Task: rotate the array to the right by k steps without extra array. Use reverse trick.

Input Format

Java method

Output Format

In-place update

Constraints

k can be bigger than n.

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next