Given a string s, return a list of strings representing all the words printed vertically in the order they appear in s.
Words are separated by single spaces. Shorter words must be padded with spaces if a character at that position is missing, but trailing spaces are not allowed at the end of any output string.
Note: Each output string represents the characters at the
-th index across all words in s, with trailing spaces stripped.
Constraints:
s.length
s contains only uppercase English letters and spaces.
It is guaranteed that there is only
Given a string s, return a list of strings representing all the words printed vertically in the order they appear in s.
Words are separated by single spaces. Shorter words must be padded with spaces if a character at that position is missing, but trailing spaces are not allowed at the end of any output string.
Note: Each output string represents the characters at the
-th index across all words in s, with trailing spaces stripped.
Constraints:
s.length
s contains only uppercase English letters and spaces.
It is guaranteed that there is only