Shutterfly Interview Question for Software Engineer / Developers


Country: United States




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

Unfortunately, could not code or optimize this properly. My solution involved a very simple sharding of the hash table by modding the kv hash by the node-id. I believe the interviewer was not very satisfied with the approach.

- edoc0code August 08, 2012 | Flag Reply
Comment hidden because of low score. Click to expand.
0
of 0 votes

Sharding is an appropriate solution for a situation like this where there's a fixed number of machines.

nodeNumber = hash % numberOfNodes;

- Anonymous August 08, 2012 | Flag
Comment hidden because of low score. Click to expand.
0
of 0 votes

Even load balancing is more important if you have physical machines because each machine will have a separate hard disk. So then you might want to invest in additional features like either using a secure hash function to ensure that it's very likely the distribution is even, or implementing some sort of re-balancing mechanism.

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

How can we optimize this for the case when the 3 virtual machines reside on the same host?

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

Use consistent hashing, Anyway how does it matter if the VM's are running on the same host or different hosts? You basically need to take care of the case when the number of nodes change and I think consistent hashing should do the trick here

- Anonymous September 08, 2013 | 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