Available question text
Count how many space-separated tokens in a sentence are "valid words" under the rules that they contain only lowercase letters, at most one hyphen (which if present must be surrounded by letters), no digits, and at most one punctuation mark (! , .) which, if present, must appear only at the end of the token. Split by spaces and validate each token against these constraints.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2047. Number of Valid Words in a Sentence
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source