Given an inclusive contiguous range of positive integerers between
and a list of lists where each sublist contains integers between
which integers satisfy
a <= n <= b and do not exist in in any of the lists.
Start = 0 End = 9 Lists = [[1,2,3], [2,3,4]]
The integers that do not occur in
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