LeetCode 12. Integer to Roman
October 28, 2024
Finished a couple easy problems, then this medium problem. I feel like this was made easier by python’s list slicing.
Solution
class Solution:
def reverseWords(self, s: str) -> str:
return ' '.join(s.split()[::-1])
O(n) = n