Blacklist

A phone manufacturer is implementing a blacklist feature so that you can block certain numbers from reaching you.

Storing actual phone numbers in the blacklist takes too much memory, so it will save only the first two digits. When a call is received, it will check if the first two digit of the number presents in the blacklist or not. If so, it will reject the call.

Alice is using the phone and added some numbers into the blacklist. Which of the following scenario could happen?

A. Alice receives calls from a blacklisted number.
B. Alice couldn't receive calls from some whitelisted number.
C. None of the above, the blacklist feature works fine.

C A B

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Marta Reece
Apr 11, 2017

A. Blacklisted numbers start with the two digits listed, so are screened off. No problem there.

B. Phone numbers have more than two digits, therefore many other numbers share the same two digit starts and will be screened even if not on the list of numbers intentionally screened for.

C. The blacklist can't work fine if B. is a problem.

Yep, this is a correct solution. Is there a way we can do this without having to store something as large as the phone number itself?

Agnishom Chattopadhyay - 4 years, 1 month ago

Log in to reply

This would be possible only if there was some relationship all phone numbers would obey, that is information which would make it possible to calculate one or more digits of the number from the remaining digits. As there is no such rule, to the best of my knowledge, this is not possible.

Marta Reece - 4 years, 1 month ago

Log in to reply

I think you are right?

Agnishom Chattopadhyay - 4 years, 1 month ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...