Write the function that calculates price of the cup of coffee where price of the condiments depends on size of the coffee cup. For example milk cost 10 c for small cup 15 c for medium and 20 c for large
Software Engineer Interview Questions
466,457 software engineer interview questions shared by candidates
Given four coins that could have any value (i.e. $.17, $.07, $.05, $.01), come up with an algorithm that figures out the fewest number of coins to get that value.
How would you find maximum element in a list of items whcih implements comparator.
Giving n numbers, and one number s, find out whether there are two numbers form the n numbers sums up to the number s. Finding one solution is extremely easy, but what's required is to find out ALL solutions to the problem and analyse the run times.
You are a parking lot attendant in a lot that has one open spot, and you want to move the cars from their original positions into a new arrangement. Create a program that will print out instructions on how to move the cars most efficiently.
Whats is max possible edges in a graph with no cycles.
Partition an array in such way zeros to be moved on the left side of the array, other numbers on the right side of the array. Extra storage not allowed, only in-place.
Items are pushed onto a stack, and therefore may be accessed in a last-in-first-out (LIFO) manner. How might you access these items in a first-in-first-out (FIFO) manner?
An array has negative and positive numbers. Separate the numbers such that negative numbers are at the beginning and positive numbers at the end without changing the order. You cannot sort it. Explain with O(1) space
We're playing a game of Russian Roulette. I take 2 consecutive bullets out of the 6 bullet revolver and spin the chamber. I go first and shoot the bullet at my head, which misses. I then pass the gun to you, where you have the option of spinning the chamber, or shooting. Which would you do to maximize your probability of not dieing?
Viewing 341 - 350 interview questions