New
The Learning module is now live
See what's new
×
Question Bank
Learning
NEW
Pricing
Blog
Forum
HOT
JobRadar
Description
Solution
Discussion
Submissions
Ask AI
Question Bank
Databricks
Coding Question
AI Insights
Quick Summary
Implement a firewall class that evaluates IPv4 addresses against an ordered list of ALLOW/DENY rules.
Rules can specify single hosts or CIDR blocks, with decision priority determined strictly by insertion order.
Return true or false based on the action of the first rule that matches the queried IP.
What This Tests
Bitwise manipulation and 32-bit integer arithmetic
Network addressing fundamentals and CIDR prefix matching
Ordered data structure traversal and priority-based filtering
String parsing and data normalization
Common Patterns
Bit Manipulation
Collapse
Hint 1
Hint 2
Hint 3
What Interviewers May Ask Next
Accepted
4.2k
/11.1k
Acceptance Rate
37.9%
Ask AI Assistant
Ask AI Assistant
Ask me anything about this coding question!
Qwen
Qwen3.7-Flash
0/2000
Auto
Debug
Run
Submit
Test Cases
Input
Output
Expected