Finally working \o/
This commit is contained in:
parent
88549528a8
commit
660cca5d23
@ -4,7 +4,9 @@ pub fn mutual_inclusion(first_pair: &[u32], second_pair: &[u32]) -> bool {
|
||||
}
|
||||
|
||||
pub fn complete_overlap(first_pair: &[u32], second_pair: &[u32]) -> bool {
|
||||
(second_pair[0] <= first_pair[0] && first_pair[0] <= second_pair[1]) || (second_pair[0] <= first_pair[1] && first_pair[1] <= second_pair[1])
|
||||
first_pair[0] >= second_pair[0] && first_pair[0] <= second_pair[1]
|
||||
|| first_pair[1] >= second_pair[0] && first_pair[1] <= second_pair[1]
|
||||
|| mutual_inclusion(first_pair, second_pair)
|
||||
}
|
||||
|
||||
pub fn solve(file_path: &str, unary_operator: &dyn Fn(&[u32], &[u32]) -> bool) -> i32 {
|
||||
|
Loading…
Reference in New Issue
Block a user