You are given a fixed number of 5 rupee, 10 rupee, 20 rupee and 50 rupee stamps. Now given an amount for sending a parcel, you should design an algorithm to come out with the minimum number of stamps that should be used for attaining that amount. For example, if the parcel costed 30 rupees, it could be attained using one 20 rupee stamp and one 10 rupee stamp OR using three 10 rupee stamps OR using one 20 rupee stamp and two 5 rupee stamps OR using one 10 rupee stamp and four 5 rupee stamps OR using two 10 rupee stamps and two 5 rupee stamps. However, the minimum number of stamps is the case of one 20 rupee stamp and one 10 rupee stamp where only two stamps are used. The case where no solution is possible should also be handled, for example, a parcel amount of exactly 33 rupees cannot be attained.
Software Engineer Google Interview Questions
664,914 software engineer google interview questions shared by candidates
String palindrome , difference between Authorization and authentication , where to use key value.
Nothing new... only the usual questions...
Say you have an unordered list of numbers ranging from 1 to n, and one of the numbers is removed, how do you find that number? What if two numbers are removed?
if there are 6 people in a team, how many handshakes will be there
Find median of an infinite stream of integers in O(1) time
Write a program to compute if one string is a rotation of another.
You are climbing a stair case. Each time you can either make 1 step or 2 steps. The staircase has n steps. In how many distinct ways can you climb the staircase ?
How would you measure 4 litres of water if you have 3 litre and 5 litre canisters?
Given an unsorted array of integers, find a 3-element subset that sums to zero
Viewing 231 - 240 interview questions