Code Room
CodingMediumcod-g1026
Subject Networking cidr subnetLevel Mid–Senior~20 minCommon in Networking & APIs interviewsIndustries Software development, Telecom

Question

Given a CIDR block like "192.168.1.10/24", compute the subnet range. Return a list [network_address, broadcast_address, num_addresses] where the two addresses are dotted-quad strings and num_addresses is the total count of addresses in the block (including network and broadcast). Host bits in the input may be set (non-strict); compute the network from the prefix length.

Implement
cidr_info(cidr: str) → list
Examples
in["192.168.1.10/24"]out["192.168.1.0","192.168.1.255",256]
What a strong answer looks like

State your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.

Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.

Run or narrate your approach, then ask the coach.