Search
⌘K
Get Premium
Leetcode 1816. Truncate Sentence
Return the substring containing the first k words from a space-separated sentence s. This is a simple string-parsing/truncation task (words are separated by single spaces 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.