LeetCode 751: IP to CIDR
Problem Restatement We are given a starting IPv4 address ip and an integer n . We need to cover exactly n consecutive IP addresses starting from ip . The answer should be a list of CIDR blocks with the smallest possible length. A CIDR block looks like this: "123.45.67.89/20" The number after / is the prefix length. A larger prefix length means a smaller block. For example, /32 covers exactly...