Given an inclusive contiguous range of positive integerers between
and a list of lists where each sublist contains integers that are within the range,
how many integers between
b do not exist in any of the lists.
Start = 0 End = 9 Lists = [[1,2,3], [2,3,4]]
The integers that do not occur in
9, so there are 6 integers that do not exist in Lists that satisfy
Start <= n <= End.
Write a function to determine how many numbers are 'used' and how many are 'unused'. (Hint, calculate unused)
Beware: Start can be small and End can be very large (the range may be larger than you would want to itterate over).
* You cannot merge any two lists (do everything inplace)
Make the tests pass
There is a file called
calc_usage in this directory with a method header.
Implement the method. You can run the tests by doing
If you want to run a specific test you can do:
python -m unittest