InterviewDB Question

IP Prefix - Match Requests Against CIDR Allowlist

Question Details

Problem You are building a firewall rule engine. Given a list of CIDR blocks (e.g., "192.168.1.0/24") and an incoming IP address string, determine whether the IP is covered by any CIDR in the list. A CIDR A.B.C.D/N covers all IPs whose first N bits m…

Full Details

🔒

Unlock full leaked content

Full insider details, leaked discussions, and candidate experiences.

Get Premium →

Topics

Coding Onsite Phone