Count how many odd integers lie in the inclusive range [low, high].
Given two integers low and high, count how many odd numbers are in the inclusive interval [low, high].
An integer is odd if it is not divisible by 2.
Return the count of odd integers between low and high, including both endpoints.
low and high describing an inclusive range.low may be less than, equal to, or greater than high in generalized practice settings; assume valid interval ordering unless stated otherwise.[low, high].low <= high.Example 1
Input
low = 3, high = 7
Output
3
Explanation
The odd numbers are 3, 5, and 7.
Example 2
Input
low = 8, high = 10
Output
1
Explanation
The only odd number in the range is 9.
Premium problem context
Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.