giving numbers 2,3,5,7,11 , 1.multiply each number by 2, 2.if the result is bigger than 25 , then go to next step, otherwise repeat the 1st step. 3. multipy the result by 3. 4. add XX 5. divide with XX. question: which number will produce maximun output
Software Developer Interview Questions
96,343 software developer interview questions shared by candidates
give you 3L bottle and 5L bottle, to get 4L water.
Given a vector of integer elements. Remove the duplicates. Do not change the order of elements.
I have 55 cents in two coins, one of these coins is not a nickel. What are the two coins?
Debug code like a compiler would
If you were a hostess at a restaurant, how would you implement a data structure to organize the reservations given x number of people per table, y number of tables, reservation time intervals of 30 minutes from 6pm-11pm, and time durations of parties at a table being one hour?
''' 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 }
if we convert string to integer "2.3" =2 "1.4"= 1 what is "3.4"+"2.5"
"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."
2nd largest number in an array
Viewing 331 - 340 interview questions