Rust Binary Heap and BTreeSet
I use a BTreeSet to keep track of the  of the available servers and and a priority queue to keep track of the assigned requests. \n\n\nuse std::cmp::Reverse;\nu
I use a BTreeSet to keep track of the  of the available servers and and a priority queue to keep track of the assigned requests. \n\n```\nuse std::cmp::Reverse;\nuse std::collections::BinaryHeap;\nuse std::collections::BTreeSet;\n\nimpl Solution {\n    pub fn busiest_servers(k: i32, arrival: Vec<i32>, load: Vec<i32>) -> Vec<i32> {\n        let k = k as usize;\n        let mut servers = BTreeSet::new();\n        for i in 0..k {\n            servers.insert(i);\n        }\n        \n        let mut activeRequests: BinaryHeap<Reverse<(i32, usize)>> = BinaryHeap::new();\n        let mut iterator = arrival.iter().zip(load.iter()).peekable();\n        let mut requests = vec![0; k];\n        let mut i = 0;\n        \n        while let Some((&t2, &l)) = iterator.peek() {\n            if activeRequests.peek().is_none() || (activeRequests.peek().unwrap().0).0 > t2 {\n                let (time, load) = iterator.next().unwrap();\n                \n                if servers.len() > 0 {\n                    let s = if let Some(server) = servers.range(i..).next() {\n                        *server\n                    } else {\n                        *servers.range(..).next().unwrap()\n                    };\n                    servers.remove(&s);\n                    requests[s] += 1;\n                    activeRequests.push(Reverse((time+load, s)));\n                }\n                i += 1;\n                i %= k;\n            } else {\n                let Reverse((_, server)) = activeRequests.pop().unwrap();\n                servers.insert(server);\n            }\n        }\n\n        let maxR = *requests.iter().max().unwrap();\n        requests.iter().enumerate().filter(|x| *x.1 == maxR).map(|x|x.0 as i32).collect()\n    }\n}\n```
['Rust']