Interview Question for Software Engineer / Developers

Country: United States
Interview Type: In-Person

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

there are certain consideration:-

1)i am assuming that recent images means anyone in your friend list added their pictures should be displayed(recently one should be on top).

2)we can have a Cache design , lets say top 5 recently uploaded pics.

3) definitely we would have pics storage table :- image_id , user_id , uploaded_time.

now we have two ways :-

1) use Cache (we maintain an LRU for top n image).
2) use API hitting pics storage table and display.

i would prefer first approach as in second one we have to hit table every time .

- vinod August 18, 2017 | Flag Reply
Comment hidden because of low score. Click to expand.
of 0 vote

can have two approach to display recently added images:-
1) use Cache for lets say top 10 pics using LRU type.
2) maintain the pic storage table :- image_id , user_id , uploaded_time.
hit above table for top 10 recently pic.

i would prefer 1st approach as we are not gonna hit table each time.
also we need to take care of availability for data , faluire etc.

- Veedee August 18, 2017 | Flag Reply
Comment hidden because of low score. Click to expand.
of 0 vote

I think the requirement here is that since fb has a lot of photos data, so we can build an app to just see the photos without the need to see the timeline. So I am thinking, we can get the photos by calling the fb api that they expose to get all the albums etc. Now what should we do if we want to support offline viewing? Lets say user is on mobile and currently in bad network or no network zone. How will the application perform? Kind of think of on similar grounds as google photos. I think when there is no network google photos show some very low resolution thumbnails so there is availability. What i dont know is how does this work? where is all this stored? What is the db schema? Is it user's mobile where all this data is stored?

- Ccq15 August 18, 2017 | 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