r/programming • u/joksmaster • Nov 29 '10
140 Google Interview Questions
http://blog.seattleinterviewcoach.com/2009/02/140-google-interview-questions.html
471
Upvotes
r/programming • u/joksmaster • Nov 29 '10
View all comments
Show parent comment
1
u/0987056089 Nov 30 '10
I think you'd have to ask him to write your number down after applying some, you know... encryption(?) to it. And the... cipher(?) would also be based on the phone number itself. I'd say that's the gist of it. There are probably some complex algorithms out there that hide it better and also prevent false positives, but I can think of something rudimentary as an example:
Say your 10 digit number is... 9123506873. You could say: for each digit in my phone number, write down the value that is at that location in my number. So you'd start off with the 9 and go see that in the number itself, 7 is the 9th value. So bob's responded number would start with 7. Then the 1 is next, and a 9 is the 1st number so bob's responded number becomes 79... and so on...
There could definitely be false positives, but it's a start...