582. Kill Process

You have n processes forming a tree structure where each process has a unique PID and a parent PPID. Given a list of PIDs and their corresponding PPIDs, and a PID to kill, return all process IDs that will be terminated, including the killed process and all of its descendants, in any order.

Examples
Input: [[1,3,10],[0,1,1],1]
Output: [1,3,10]
Hints

582. Kill Process

You have `n` processes forming a tree structure where each process has a unique PID and a parent PPID. Given a list of PIDs and their corresponding PPIDs, and a PID to kill, return all process IDs that will be terminated, including the killed process and all of its descendants, in any order.