Question: 4 7 . Location Detection ALL Implement a prototype service to detect a user's location based on their IP addresses. The IP addresses belonging to
Location Detection
ALL
Implement a prototype service to detect a user's location based on their IP addresses.
The IP addresses belonging to the IPv space are conventionally represented by four octets, abcd
such as To keep it simple, these IP addresses are classified into different regions indexed from to on the basis of the order of the bits in the first octet.
Broadly, the IP Addresses are categorized as follows:
Given a list of strings, ipaddresses, of size n representing possible IPv addresses, for each address, determine if it is a valid IP or not, and classify it into one of the classes. Return an array of n integers that represent the index of the regions for the corresponding IP addresses.
Represent an invalid IP as Give me a java code
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
