---
title: "Discussion on \"[Solution]189. Rotate Array\" | Hashnode"
description: "Discussion on \"[Solution]189. Rotate Array\". Problem\nProblem_Link\nSolutions (time, space)\nO(n), O(n)\nclass Solution {\n    public void rotate(int[] nums, int k) {\n        int len = nums.length;\n        int[] rtnNums = new int[len];\n\n        // Rotate elements\n        for (int i = 0; i < len; i++..."
url: "https://hashnode.com/posts/solution189-rotate-array/63b88b4ee4e46e591c593fb1"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [\[Solution\]189. Rotate Array](https://eunhanlee.hashnode.dev/solution189-rotate-array?utm_source=hashnode&utm_medium=feed)

Problem Problem\_Link Solutions (time, space) O(n), O(n) class Solution { public void rotate(int\[\] nums, int k) { int len = nums.length; int\[\] rtnNums = new int\[len\]; // Rotate elements for (int i = 0; i < len; i++...

Jan 6, 2023 · 3 min read · eunhanlee.hashnode.dev  
Read the article

-   [#189-rotate-array](https://hashnode.com/tag/189-rotate-array)
-   [#leetcode](https://hashnode.com/tag/leetcode)
-   [#leetcode-solution](https://hashnode.com/tag/leetcode-solution)
-   [#rotate-array](https://hashnode.com/tag/rotate-array)

## Written by

[Han](https://hashnode.com/@EunHaSu)

@EunHaSu · VA, US

  
[View profile](https://hashnode.com/@EunHaSu)

Java, Android, Algorithm

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
