Your question is Windows or Linux Internals. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Tell me about a time you had to work with Windows or Linux internals for security.
For the coding portion, analyze process-parent relationships and identify process IDs that participate in a cycle, which can indicate corrupted or tampered process-tree metadata. Implement the function below and return the IDs in ascending order.
events is a list of dictionaries, each containing a unique integer pid and a ppid, which is another process ID or null. Return a list of all process IDs belonging to directed cycles. Parent IDs absent from events represent external roots and cannot form part of a cycle.
def find_process_tree_cycles(events):