Java Algorithm to solve vendor machine 'change giving' problem

前端 未结 6 796
太阳男子
太阳男子 2021-01-16 22:10

As a graduate I went for an interview for a java development role and was doing pretty well in the technical examinations until i came up against this question.

If i

6条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-16 22:25

    Probably get started on looking at Dynamic programming. However you could any approach problem for that matter trivially. How would you do that manually ??. Jot down the steps. Convert it into an algorithm yourself. Probably studying Permutations & Combinations would help for better understanding of the problem you have stated.

    Hope it helps.

提交回复
热议问题