Algorithm · Amplitude · Medium
You are building a compliance auditing feature for a file‑system. The directory structure is a tree where each folder object contains an integer id, a name string, and a list of subfolders that hold its immediate child folders. You are given a list of root folders (the top‑level entries of one or more trees) and a list of rule functions. Each rule accepts a single folder and returns true if the folder passes the check, or false if it fails. Your job is to apply every rule to…