SHARE
TWEET

Untitled

a guest Sep 21st, 2019 99 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Solution:
  2.     def reverseWords(self, s: List[str]) -> None:
  3.         """
  4.         Do not return anything, modify s in-place instead.
  5.         """
  6.        
  7.         ns = "".join(s)
  8.         arr = ns.split(' ')
  9.         arr = arr[::-1]
  10.         ns = " ".join(arr)
  11.         for i in range(len(ns)):
  12.             s[i] = ns[i]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top