Google Interview Question for Software Engineer / Developers


Country: United States
Interview Type: In-Person




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

Store full URLs in a database table. To get the shortened form, just get, say, the base 62 version of the ID of the URL's row in the table (62 = ten digits, 26 lowercase characters, 26 uppercase characters). The service itself would issue HTTP 302 redirects to avoid putting its own shortened link into the browser's history.

- nilkn January 20, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

The formulation of the question is probably wrong; "Design a URL shortener" seems more like it.

- Fares January 18, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

How could we do that?

- Guy January 18, 2014 | Flag
Comment hidden because of low score. Click to expand.
1
of 1 vote

There is a Stack Overflow thread, titled "How to code a URL shortener?". which goes into the gritty details. Unfortunately, links can't be used here, but check it out through Google.

- Fares January 18, 2014 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Wow, it looks very complicated....

- Guy January 19, 2014 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 vote

First, Google has such a service @ //goo.gl/
Second, one URL A is transferred:
one URL B is send to google server and get A;
the browser auto get page using URL A;
Length(B) << Length(A)
So, it is not compress the URL A, but build a URL mapping service.

- xuyan.nus June 26, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

What's up mates, good paragraph and good urging commented here, I am truly enjoying by these.

- What's up mates, good paragraph and good urging commented here, I am truly enjoying by these. December 09, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
-1
of 1 vote

This thread will give you some idea about shortURL..
stackoverflow.com/questions/1562367/how-do-short-urls-services-work

- Coder January 18, 2014 | 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