Google Interview Question for Software Engineer / Developers






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

You can design a cache server using a dynamic data structure like a double linked list. while you must be able to read the cache concurrently, only one thread or process must be able to write to it a time. this could be achieved by procuring specific read and write locks in the POSIX thread API.For cache eviction policy, LRU is a good choice and it can be implemented using counters.

- jimit May 08, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 2 vote

See Memcache (http://www.danga.com/memcached/)

- Anonymous May 11, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 2 vote

See http://www.mnot.net/cache_docs/

- Anonymous August 13, 2009 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

similar , as designed for operating system cache . And same (or modified) cache consistency methods.

- mrn August 16, 2013 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 vote

use simple LRU strategy cache, or use memcached.

for the read operation, it check the Cache first,
if hit the cache, it return the value directly.
if can not hit the cache, it need to read from the Database, and reset the the KV to the Cache.

for the write operation, it should delete the KV in the cache first, to make sure no one will hit the stale data, then write the KV to the Database.

wish it can help.

- suwei19870312 July 23, 2014 | Flag Reply
Comment hidden because of low score. Click to expand.
-2
of 2 vote

See Memcache (http://www.danga.com/memcached/)

- Anonymous May 11, 2009 | 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