Search
⌘K

Leetcode 1324. Print Words Vertically

Given a sentence of space-separated words, return the vertical reading by treating each word as a row and collecting characters column-by-column (i.e., the i-th string is formed from the i-th characters of all words). Handle differing word lengths by using spaces where a word is too short, but trim trailing spaces from each output string.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.