CIDR subnet range
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) → listExamples
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.
0:00 of about 20 min
solution.py
InputExpectedGot
["192.168.1.10/24"]["192.168.1.0","192.168.1.255",256]not run yetsample