You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: _582_kill_process.rs
    path of file: ./repos/rustgym/leetcode/src/d5
    
    the code of the file until where you have to start completion: struct Solution;
use std::collections::HashMap;
use std::collections::VecDeq
    
    fn kill_process(pid: Vec<i32>, ppid: Vec<i32>, kill: i32) -> Vec<i32> {
        let mut res = vec![];
        let mut queue: VecDeque<i32> = VecDeque::new();
        let mut hm: HashMap<i32, Vec<i32>> = HashMap::new();
        let n = pid.len();
        for i in 0..n {
            let x = pid[i];
            let y = ppid[i];
            hm.entry(y).or_default().push(x);
        }
        queue.push_back(kill);
        while let Some(front) = queue.pop_front() {
            res.push(front);
            if let Some(children) = hm.get(&front) {
                for &child in children {
                    queue.push_back(child);
                }
            }
        }
        res
    }