isnt it is similar to coin change problem , here we need minimum number of stamps to form a value. so we can check which number exceed the min stamp range i.e 1 to 3.
On Jun 19, 11:55 am, sanjay pandey <sanjaypandey...@gmail.com> wrote: > The postage stamp problem is a mathematical riddle that asks what is the > smallest postage value which cannot be placed on an envelope, if the letter > can hold only a limited number of stamps, and these may only have certain > specified face values. > > For example, suppose the envelope can hold only three stamps, and the > available stamp values are 1 cent, 2 cents, 5 cents, and 20 cents. Then the > solution is 13 cents; since any smaller value can be obtained with at most > three stamps (e.g. 4 = 2 + 2, 8 = 5 + 2 + 1, etc.), but to get 13 cents one > must use at least four stamps. > > Is there an algorithm that given the maximum amount of stamps allowed and > the face value of the stamps, one can find the smallest postage that cannot > be placed on the envelope? -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com. To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.