Closed lekan-pvp closed 5 months ago
Winston Tang commented: Dear lekanlekan,
Thank you for reaching out to us. From your report, it seems there might be a misunderstanding about the requirements of the "Rotate Array" problem. The problem expects you to rotate the array in-place, meaning you are required to modify the input array directly without allocating additional space (i.e., returning/printing a new array).
In your code, it seems you're trying to print the rotated array, which isn’t the expected solution. You are advised to update the 'nums' array such that it becomes the rotated array after the function.
You can reference the problem's discussion section to see how other users approach this problem. It might help clarify the task.
We hope this clarifies the situation. Please feel free to reach out if you have any other questions or concerns.
Best, LeetCode Support Team.
LeetCode Username
lekanlekan
Problem Number, Title, and Link
Rotate Array
Bug Category
Incorrect test case (Output of test case is incorrect as per the problem statement)
Bug Description
The function has no return value. It is unclear how to get an answer. It does not accept output to the screen either. At startup, everything passes. Returns an error when sending.
Language Used for Code
Go
Code used for Submit/Run operation
Expected behavior
the test should pass as at running
Screenshots
Additional context
No response