You are given pid) and a parent process ID (ppid). You are provided with two integer arrays pid and ppid of length pid[i] is the ID of the ppid[i] is the ID of its parent process.
Each process has only one parent process, but may have multiple child processes. Only one process has a ppid of
When a process is terminated, all of its direct child processes and all of their descendants are also killed.
Given an integer kill representing the ID of the process you want to terminate, return a list containing the IDs of all processes that will be killed. You may return the answer in any order.
Constraints:
n == pid.length
n == ppid.length
pid[i]
ppid[i]
Only one process has no parent.
All the values of pid are unique.
kill is guaranteed to be in pid.
You are given pid) and a parent process ID (ppid). You are provided with two integer arrays pid and ppid of length pid[i] is the ID of the ppid[i] is the ID of its parent process.
Each process has only one parent process, but may have multiple child processes. Only one process has a ppid of
When a process is terminated, all of its direct child processes and all of their descendants are also killed.
Given an integer kill representing the ID of the process you want to terminate, return a list containing the IDs of all processes that will be killed. You may return the answer in any order.
Constraints:
n == pid.length
n == ppid.length
pid[i]
ppid[i]
Only one process has no parent.
All the values of pid are unique.
kill is guaranteed to be in pid.