I recently went through a Google Hangout Interview. I wanted to share the question with the leetcode community to get a proper approach for it.
Question:
We have one webserver which is serving large requests per second let's say 50K. Along with each request, we know the IP address of the connected user.
We have one database(you can assume any) which has information on the IP address range and its country name.
eg.
100.100.100.100 - 200.200.200.200 belongs to india.
We need to implement the function which has input as an IP address(IPv4) and output as country name.
Edit: