Algorithm · Databricks · Hard
A firewall is configured using an ordered list of rules. Each rule declares an action — "ALLOW" or "DENY" — and an IP address range specified in CIDR notation (e.g., "192.168.1.0/24"). You must implement the function that returns the decision for a single destination IP address. The rules are evaluated from first to last. The first rule whose CIDR block contains the given IP determines the outcome. Later rules have no effect, even if their ranges overlap with an earlier…
Checking your access…