mirror of
https://github.com/devenperez/leetcode.git
synced 2026-06-13 14:57:08 +00:00
Time: 31 ms (87.21%), Space: 14 MB (74.76%) - LeetHub
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
class Solution:
|
||||
def reverseWords(self, s: str) -> str:
|
||||
words = s.split()
|
||||
words.reverse()
|
||||
return " ".join(words)
|
||||
Reference in New Issue
Block a user