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

Reversing Words in a String #30

Open
freedom5566 opened this issue May 3, 2018 · 0 comments
Open

Reversing Words in a String #30

freedom5566 opened this issue May 3, 2018 · 0 comments

Comments

@freedom5566
Copy link

freedom5566 commented May 3, 2018

https://www.codewars.com/kata/reversing-words-in-a-string

題目:

You need to write a function that reverses the words in a given string. A word can also fit an empty string. If this is not clear enough, here are some examples:

As the input may have trailing spaces, you will also need to ignore unneccesary whitespace.

你需要編寫一個可以反轉字串單字的函式,一個單字也能是一個空字串。如果這不夠清楚,這裡是一些範例。

輸入可能有尾隨空格,你還需要忽略不必要的空格。

reverse("Hello World") === "World Hello"
reverse("Hi There.") === "There. Hi"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant