Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
You need to maintain a sorted list for each movie and a sorted list for rented movies
When renting a movie remove it from its movies sorted list and added it to the rented list and vice versa in the case of dropping a movie