Find the maximum number of times room/s are used from n rooms , provided the appointment time and duration.
eg:
total no of rooms =3,
appointments times = [23, 1, 5, 3, 19, 8]
appointment durations=[2,20,2,3,1,9]
calculation of appointment duration = starttime +duration
Please provide optimized solutiion for this.