Google Interview Question for SDE1s

Country: India

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

here are some basic Idea.
1. there should has many file server, which used to store data from user client.
2. master web server tell user client send the file to which file server. and save the file with encode name, or even data encode.
3. and use the encode name and file server to generate url, user then can use this url to access the text.
4. there should has account service, which used to make sure this user's storage limitation.
5. there should has duplicate logic, which make sure the file is can not access because file server down.

- suwei19870312 June 17, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
of 0 vote

Here is other solution
Assumptions - Only registered users can use this service.
All files are stored in S3 or similar system.
1. When user paste a text generate a hascode of the text, and hashcode can be used as a filename.
2. Generate a user by using username + hash code

- Amit July 18, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
of 0 vote

Some thoughts with respect to each phase ... please help improve

Pastebin utility or pastebin service
Should paste some text - max. limit of text, only ascii characters or symbols (i.e. Roman characters or any other alphabet)
Location of the destination document in which text is to be pasted, i.e. server, disk etc.

Text should be accessible with the help of a URL - so URL-text relationship, is it one-to-one or one-to-many? How about one-to-none? I.e. URL exists but does not map to any text. Should we use already exisiting URLs? Can new URL be created on fly?
Is there a maintainable URL repository?
Details about invoker(s) of this service
Details about end-users of this service - what happens once a URL-text mapping is established - any persistence happening here? Or notifications being sent to the invoker?

URL - string (starting with http, https or ftp)
URL repository - memory(list), database, cache, file (application/disk)
URL creation - pre-existing or on-the-fly
URL-Text map repository - database, cache
URL-Text mapping - one-to-one, one-to-many

Namespace: com.gooogle.pastebin

driver - main driver class - PasteBinDriver
processor - PasteBinProcessor
service - PasteBinService
persistence - PasteBinPersistence

Patterns used:
Factory/abstract factory for creating objects in each layer
Singleton for driver class

- ompranav January 15, 2015 | Flag Reply
Comment hidden because of low score. Click to expand.
of 1 vote

What was your response to this ? ... Could you please share some design ideas

- Tarzan May 26, 2014 | Flag Reply

Add a Comment

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


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


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