Interview Question


Country: United States




Comment hidden because of low score. Click to expand.
0
of 0 vote

How about using set data structures??
It would remove duplicates automatically.

- rajagopalshyam1994 September 06, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Why do people who have no clue try to post answers?

- Anonymous September 07, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

The only thing that comes to mind is a hash of the customer's unique identifier.
The hash would be ideally 7 digits. The identifier would be something like their passport number or drivers licences. This is how Gravatar ensures profile avatars to be unique.

- sonnyhe2002 September 07, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

First there has to common repository for all the telephone number allocated... So a hosted ditributed cache server, a memcached can be used.. Memcached is a no-sql distributed in memory db.. Here a key is the telephone number value could be 0.

Now when a new telephone number has to be issued, an application will make HTTP / TCP/IP call. Will call the server asking for a permission.. Over HTTP or TCP/IP I dont care, HTTP is better as port and other crap you dont have to worry..and you dont have to write a client.. So your server is just a web server listining on 80 port.. Your web server will get the request, it will contact memcached servers for validation..If telephone number is avialable, it will return 200 OK else returns 201 OK. Its not as simple as it sounds as you will have to write an apache plugin...

- Prashant R Kumar September 07, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

First there has to common repository for all the telephone number allocated... So a hosted ditributed cache server, a memcached can be used.. Memcached is a no-sql distributed in memory db.. Here a key is the telephone number value could be 0.

Now when a new telephone number has to be issued, an application will make HTTP / TCP/IP call. Will call the server asking for a permission.. Over HTTP or TCP/IP I dont care, HTTP is better as port and other crap you dont have to worry..and you dont have to write a client.. So your server is just a web server listining on 80 port.. Your web server will get the request, it will contact memcached servers for validation..If telephone number is avialable, it will return 200 OK else returns 201 OK. Its not as simple as it sounds as you will have to write an apache plugin...

- Prashant R Kumar September 07, 2012 | Flag Reply


Add a Comment
Name:

Writing Code? Surround your code with {{{ and }}} to preserve whitespace.

Books

is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.

Learn More

Videos

CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.

Learn More

Resume Review

Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.

Learn More

Mock Interviews

Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.

Learn More