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 its descendants).

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

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 its descendants).