simple and beautiful code.
Posts made by Richardo92
RE: A O(n) Solution with more cost on space
We should consider in this way.
What will be the longest time for a meeting?
When the number of meetings n increases, will this longest time start to increase, either?
It will stay same.
So when the number of meetings n increases, the time of meeting will stay constant, say 100, 1000, 10000 or more, But it doesn't matter, right? We can find a constant which is bigger than the longest time of one meeting.
So the total time complexity should be O(n)