You have unordered list of pairs of days numbers - days when hotel visitor arrives and leaves ({1, 4}, {6, 8}, {2, 4}, ...). Find out max number of visitors that lived in this hotel at the same time. If at the same day one visitor leaves hotel and another one arrives, we must assume that on this day only one visitor lived in hotel room.
You have unordered list of pairs of days numbers - days when hotel visitor arrives and leaves ({1, 4}, {6, 8}, {2, 4}, ...). Find out max number of visitors that lived in this hotel at the same time. If at the same day one visitor leaves hotel and another one arrives, we must assume that on this day only one visitor lived in hotel room.