Leetcode 1451. Rearrange Words in a Sentence
Reorder the words of a sentence so they are in nondecreasing length, preserving original order for equal lengths, and return the sentence with the first word capitalized and all other words lowercase. Input is a single spaceāseparated sentence (first letter uppercase, rest lowercase), length up to 10^5.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.