We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84ad16d commit 141093eCopy full SHA for 141093e
1 file changed
meeting-rooms/DaleSeo.rs
@@ -0,0 +1,8 @@
1
+// TC: O(n logn)
2
+// SC: O(1)
3
+impl Solution {
4
+ pub fn can_attend_meetings(mut intervals: Vec<Vec<i32>>) -> bool {
5
+ intervals.sort_by_key(|i| i[0]);
6
+ intervals.windows(2).all(|w| w[0][1] <= w[1][0])
7
+ }
8
+}
0 commit comments