Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ed27f66

Browse files
authored
feat: add rust solution to lc problem: No.2446 (#1363)
Signed-off-by: xiaolatiao <1628652790@qq.com>
1 parent 576638c commit ed27f66

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

‎solution/2400-2499/2446.Determine if Two Events Have Conflict/README.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,16 @@ function haveConflict(event1: string[], event2: string[]): boolean {
120120
}
121121
```
122122

123+
### **Rust**
124+
125+
```rust
126+
impl Solution {
127+
pub fn have_conflict(event1: Vec<String>, event2: Vec<String>) -> bool {
128+
!(event1[1] < event2[0] || event1[0] > event2[1])
129+
}
130+
}
131+
```
132+
123133
### **...**
124134

125135
```

‎solution/2400-2499/2446.Determine if Two Events Have Conflict/README_EN.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,16 @@ function haveConflict(event1: string[], event2: string[]): boolean {
102102
}
103103
```
104104

105+
### **Rust**
106+
107+
```rust
108+
impl Solution {
109+
pub fn have_conflict(event1: Vec<String>, event2: Vec<String>) -> bool {
110+
!(event1[1] < event2[0] || event1[0] > event2[1])
111+
}
112+
}
113+
```
114+
105115
### **...**
106116

107117
```
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
impl Solution {
2+
pub fn have_conflict(event1: Vec<String>, event2: Vec<String>) -> bool {
3+
!(event1[1] < event2[0] || event1[0] > event2[1])
4+
}
5+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /