Java Algorithm to solve vendor machine 'change giving' problem

前端 未结 6 793
太阳男子
太阳男子 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:26

    Algorithm F on (in-text) page 7 is exactly what you're looking for. :)

    http://www-cs-staff.stanford.edu/~uno/fasc3a.ps.gz

提交回复
热议问题