151-Reverse-Words-In-A-String
Sat 17 May 2025
https://leetcode.com/problems/reverse-words-in-a-string
import pyutil as pyu
pyu.get_local_pyinfo()
print(pyu.ps2("python-dotenv"))
from typing import List
class Solution:
def reverseWords(self, s: str) -> str:
return ' '.join(reversed(s.split()))
new Solution().reverseWords()
Score: 5
Category: leetcode