Developer Interview Questions

270,915 developer interview questions shared by candidates

You have two methods: one method takes long time to run and the other completes in short time. You execute the long method first and after that you execute the short method. Which one will complete first. There is no setTimeout involved.
avatar

Senior UI Developer

Interviewed at ValueLabs

4
Apr 30, 2015

You have two methods: one method takes long time to run and the other completes in short time. You execute the long method first and after that you execute the short method. Which one will complete first. There is no setTimeout involved.

Give me 5 different ways of finding the median (middle element) of a linked list. For the sake of simplicity, assume the list has odd number of ints. Also mention the runtime for each. Follow up: What's the fastest way you could find the median? What is the runtime? Oh.. and yes, code your answer(s) in any language of your preference.
avatar

Software Developer Intern

Interviewed at Expedia Group

3.7
Aug 27, 2012

Give me 5 different ways of finding the median (middle element) of a linked list. For the sake of simplicity, assume the list has odd number of ints. Also mention the runtime for each. Follow up: What's the fastest way you could find the median? What is the runtime? Oh.. and yes, code your answer(s) in any language of your preference.

You have a function f(p) that returns an array of linked pages e.g f(homepage) = {page1, page2, page3}. Or f(page1) = {page4, page5}. If there is no linked pages function will return null. And we say one site is a good site if we can get to any page of that site in a less than 6 clicks. The task was to write a function that will check is it a good site or not using f(p).
avatar

Software Developer

Interviewed at Booking.com

4.1
Dec 9, 2017

You have a function f(p) that returns an array of linked pages e.g f(homepage) = {page1, page2, page3}. Or f(page1) = {page4, page5}. If there is no linked pages function will return null. And we say one site is a good site if we can get to any page of that site in a less than 6 clicks. The task was to write a function that will check is it a good site or not using f(p).

Viewing 251 - 260 interview questions

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