#C42. Length of Shortest Word
Length of Shortest Word
Length of Shortest Word
Given a string consisting of words separated by spaces, your task is to determine the length of the shortest word. If the string is empty or contains only whitespace, return 0
.
Note: A word is defined as a sequence of non-space characters. In mathematical notation, you can represent the solution as: $$\min_{word \in S} |word|$$, where \(|word|\) denotes the length of the word.
inputFormat
The input is read from stdin
and consists of a single line containing the string.
outputFormat
The output should be printed to stdout
and is a single integer representing the length of the shortest word in the string.
bitcoin take over the world maybe who knows perhaps
3