IP CIDR Firewall Filtering
Asked at Amazon · Coding Questions · Difficulty: Medium
Given a list of firewall rules in CIDR format where each rule either allows or denies an IP range, determine whether an input IPv4 address passes. Rules are checked in order and the **first** matching rule wins. If no rule matches, the address is denied.
Loading the problem…