(Solved) James is a businessman. He is on a tight schedule this week. The week starts on Monday at 00:00 and ends on Sunday at 24:00
James is a businessman. He is on a tight schedule this week. The week starts on Monday at 00:00 and ends on Sunday at 24:00. His schedule consists of M meetings he needs to take part in. Each of them will take place in a period of time, beginning and ending on the same day (there are no two ongoing meetings at the same time). James is very tired, thus he needs to find the longest possible time slot to sleep. In other words, he wants to find the longest period of time when there are no ongoing meetings. The sleeping break can begin and end on different days and should begin and end in the same week. You are given a string containing M lines. Each line is a substring representing one meeting in the schedule, in the format “Ddd hh:mm-hh: mm”. “Ddd” is a three-letter abbreviation for the day of the week when the meeting takes place: “Mon” (Monday), “Tue”, “Wed”, “Thu”, “Fri”, “Sat”, “Sun” hh :mm-hh: mm” means the beginning time and the ending time of the meeting (from 00:00 to 24:00 inclusive) The given times represent exact moments of time. So, there are exactly five minutes between 13:40 and 13:45.
Expert Answer
Answer to James is a businessman. He is on a tight schedule this week. The week starts on Monday at 00:00 and ends on Sunday at 24:00….
OR