Software Developers Interview Questions

96,169 software developers interview questions shared by candidates

"You are given an array of integers where every integer occurs an even number of times, except one integer that appears an odd number of times. Return the odd occurring integer. Write functioning code and read it to me when you're done."
avatar

Software Developer

Interviewed at Amazon

3.5
Oct 22, 2011

"You are given an array of integers where every integer occurs an even number of times, except one integer that appears an odd number of times. Return the odd occurring integer. Write functioning code and read it to me when you're done."

5 horses on a 5-lane track. You have 5 horses and you want to rank the top three. All you have available to you is a track and the ability to tell perfectly in which order the horses crossed the finish line. How many races are necessary in order to rank the top three horses?
avatar

Software Developer

Interviewed at Oracle

3.5
May 29, 2010

5 horses on a 5-lane track. You have 5 horses and you want to rank the top three. All you have available to you is a track and the ability to tell perfectly in which order the horses crossed the finish line. How many races are necessary in order to rank the top three horses?

''' We want to implement a feature to suggest to users the cheapest hotel that is more popular than the one they are looking at. Write a function that given an array of hotels, sorted by their popularity returns a map from the hotel ids that associates each hotel with the cheapest hotel that is more popular than the one in question. if there is no hotel that is cheaper and more popular than the one with that id, then it shouldn't be put in the map. You can assume that hotel ids and prices are integers and that hotels have the following format: struct hotel{ int id; int price; } Example 1: input = [ { id => 123, price => 200 }, # Most popular { id => 55, price => 150 }, # Second most popular { id => 17, price => 70 }, # Third most popular { id => 18, price => 500 }, # ... { id => 27, price => 270 }, { id => 101, price => 230 } # Least popular ] output = { 18 : 17, 27 : 17, 101 : 17 }
avatar

Software Developer

Interviewed at Booking.com

4.1
Mar 4, 2018

''' We want to implement a feature to suggest to users the cheapest hotel that is more popular than the one they are looking at. Write a function that given an array of hotels, sorted by their popularity returns a map from the hotel ids that associates each hotel with the cheapest hotel that is more popular than the one in question. if there is no hotel that is cheaper and more popular than the one with that id, then it shouldn't be put in the map. You can assume that hotel ids and prices are integers and that hotels have the following format: struct hotel{ int id; int price; } Example 1: input = [ { id => 123, price => 200 }, # Most popular { id => 55, price => 150 }, # Second most popular { id => 17, price => 70 }, # Third most popular { id => 18, price => 500 }, # ... { id => 27, price => 270 }, { id => 101, price => 230 } # Least popular ] output = { 18 : 17, 27 : 17, 101 : 17 }

In the coding round they asked....take a string in the combination of capital letters, small letters and spaces.after execution it should produce o/p such as capitals at 1st, then spaces, then small letters.eg:- if input is abAB ab.then output should be AB abab.
avatar

Software Developer

Interviewed at RetailOn

2.8
Oct 6, 2015

In the coding round they asked....take a string in the combination of capital letters, small letters and spaces.after execution it should produce o/p such as capitals at 1st, then spaces, then small letters.eg:- if input is abAB ab.then output should be AB abab.

Viewing 341 - 350 interview questions

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