Parking lot
Consider the car parking lot as 0 indexed array. Given a list of positions occupied by cars and k, return the min length of roof required to cover k cars.
Number of possible encoded copies
For an array, another array is considered as a encoded if the difference between consecutive elements is same for both. Given an array of consecutive differnces, lowerbound and upperbound value, return the number of possibile copies such that all the elements lay in range of lowerbound and upperbound(both included). If there is no possibility return 0.
EDIT:
For second question, we will be provided a list of integers (difference between consecutive elements of an array), a lowerbound(int) and an upperbound(int). We have to return number of possible arrays such that all the elements are in the range [lowerbound, upperbound] and having same consecutive element differences as given list.