NeetCode #605LC-582MediumGraphsNC Algo100
← Back to All Problems

#605 · #582 · Kill Process(杀掉进程)

📌 Problem Statement & Constraints

You are given pid (process ids), ppid (parent ids, 0 means no parent) and kill (the process to kill). When a process is killed, all its descendants are killed too. Return the ids of the killed processes in any order. Constraints: 1 <= pid.length <= 5 * 10^4, 1 <= pid[i] <= 5 * 10^4.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!