Sponsored
Use these hints if you're stuck. Try solving on your own first.
It's easier to solve this problem on an array of strings so parse the string to an array of words
After return the first k words as a sentence
Solve with full IDE support and test cases