Number of Flowers in Full Bloom LeetCode solution in Rust
1impl Solution {2pub fn full_bloom_flowers(flowers: Vec<Vec<i32>>, people: Vec<i32>) -> Vec<i32> {3let get_time_and_sort = |i| {4let mut ret = flowers.iter().map(|f| f[i]).collect::<Vec<_>>();5ret.sort();6ret7};8let start = get_time_and_sort(0);9let end = get_time_and_sort(1);1011people12.into_iter()13.map(|time| {14(start.partition_point(|&s| s <= time) - end.partition_point(|&e| e < time)) as i3215})16.collect()17}18}