Developer Interview Questions

270,915 developer interview questions shared by candidates

Union of n arrays with x elements. Output common members contained in at least 2 arrays. Explain the complexity of the algorithm used. We have a digested server log with username, visited page and timestamp. Create a processing algorithm that will output the most visited page/areas in such a way that will match partial path as well. i.e. { { user: "user1", page="/home" }, { user: "user1", page="/home/account" }, { user: "user1", page="/home/account/profile" }, { user: "user1", page="/home/account/login" }, { user: "user2", page="/about" }, { user: "user2", page="/about/contact" }, { user: "user2", page="/home" } } the output user1 - home/account - home user2 - /about PS I'm rephrasing because I cannot recall exactly the question
avatar

Software Developer

Interviewed at Booking.com

4.1
Jan 14, 2016

Union of n arrays with x elements. Output common members contained in at least 2 arrays. Explain the complexity of the algorithm used. We have a digested server log with username, visited page and timestamp. Create a processing algorithm that will output the most visited page/areas in such a way that will match partial path as well. i.e. { { user: "user1", page="/home" }, { user: "user1", page="/home/account" }, { user: "user1", page="/home/account/profile" }, { user: "user1", page="/home/account/login" }, { user: "user2", page="/about" }, { user: "user2", page="/about/contact" }, { user: "user2", page="/home" } } the output user1 - home/account - home user2 - /about PS I'm rephrasing because I cannot recall exactly the question

A rustic village contains one million married couples and no children. Each couple has exactly one child per year. Each couple wants a girl, but also wants to minimize the number of children they have, so they will continue to have children until they have their first girl. Assume that children are equally likely to be born male or female. Let p(t) be the percentage of children that are female at the end of year t. What is p(t)? "Can't tell" is a potential answer if you don't have sufficient information.
avatar

Senior Java Developer

Interviewed at Acuitus

4.4
Apr 6, 2010

A rustic village contains one million married couples and no children. Each couple has exactly one child per year. Each couple wants a girl, but also wants to minimize the number of children they have, so they will continue to have children until they have their first girl. Assume that children are equally likely to be born male or female. Let p(t) be the percentage of children that are female at the end of year t. What is p(t)? "Can't tell" is a potential answer if you don't have sufficient information.

Viewing 291 - 300 interview questions

Glassdoor has 270,915 interview questions and reports from Developer interviews. Prepare for your interview. Get hired. Love your job.