Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

344.Reverse String #6

Closed
soulhat opened this issue Sep 24, 2020 · 0 comments
Closed

344.Reverse String #6

soulhat opened this issue Sep 24, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@soulhat
Copy link
Owner

soulhat commented Sep 24, 2020

Write a function that reverses a string. The input string is given as an array of characters char[].

Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory.

You may assume all the characters consist of printable ascii characters.

Example 1:

Input: ["h","e","l","l","o"]
Output: ["o","l","l","e","h"]

Example 2:

Input: ["H","a","n","n","a","h"]
Output: ["h","a","n","n","a","H"]
@soulhat soulhat added the enhancement New feature or request label Sep 24, 2020
@soulhat soulhat self-assigned this Sep 24, 2020
@soulhat soulhat changed the title Reverse String 344.Reverse String Sep 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant