1324. Print Words Vertically
https://leetcode.com/problems/print-words-vertically
Description
Given a string s
. Return all the words vertically in the same order in which they appear in s
.
Words are returned as a list of strings, complete with spaces when is necessary. (Trailing spaces are not allowed).
Each word would be put on only one column and that in one column there will be only one word.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= s.length <= 200
s
contains only upper case English letters.It's guaranteed that there is only one space between 2 words.
ac
Last updated