first to last, inclusive. Odd-numbered houses stand on one side of the street and even-numbered ones on the other.
How many of these houses are on the odd side? Return that count.first=4, last=11 → 4
The odd numbers are 5, 7, 9 and 11, so four houses.
first=6, last=6 → 0
The only house, number 6, is on the even side.
first=0, last=3 → 2
Numbers 1 and 3 qualify.
first=4, last=11
4
Run checks the first 3 tests in your browser. Submit checks all 94 tests on the server, hidden ones included.