Search
⌘K
Get Premium
Leetcode 1859. Sorting the Sentence
Given a shuffled sentence where each word has its 1-indexed position (a digit 1–9) appended, reconstruct the original sentence by ordering words by that position and removing the digits. The input has 1–9 space-separated words with no leading/trailing spaces.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.