Software Developers Interview Questions

96,321 software developers interview questions shared by candidates

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 121 - 130 interview questions

Glassdoor has 96,321 interview questions and reports from Software developers interviews. Prepare for your interview. Get hired. Love your job.