Practice Count Odd Numbers in an Interval Range
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Given two non-negative integers low and high. Return the count of odd numbers between low and high (inclusive).
Source: Count Odd Numbers in an Interval Range on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
low = 3, high = 7
Output
3
# Example 2
Input
low = 8, high = 10
Output
1
Constraints
0 <= low <= high <= 10^9
Related LeetCode Problems
Practice more problems similar to Count Odd Numbers in an Interval Range.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.