My Portfolio

Hello, I am Web Application Developer from Wroclaw, Poland. I have developed myself with the best practices in web application building. This website is built with RubyonRails. I am also good at Javascript Frameworks and Libraries. I love to talk with you about our unique.

Contact Me

CashMachine


GreedyAlgorithm

https://oraykt-developx.herokuapp.com/
https://oraykt-developx.herokuapp.com/api-docs/
https://travis-ci.org/github/oraykt/cashmachine

The Problem

Develop a solution that simulates the delivery of notes when a client does a withdrawal in a cash machine.

The basic requirements are the following:

Develop a solution that simulates the delivery of notes when a client does a withdrawal in a cash machine.
The basic requirements are the following:
- Always deliver the lowest number of possible notes;
- It’s possible to get the amount requested with available notes;
- The client balance is infinite;
- Amount of notes is infinite;
- Available notes $ 100,00; $ 50,00; $ 20,00 e $ 10,00

Example:

  • Entry: 30.00 Result: [20.00, 10.00]
  • Entry: 80.00 Result: [50.00, 20.00, 10.00]
  • Entry: 125.00 Result: throw NoteUnavailableException
  • Entry: -130.00 Result: throw InvalidArgumentException
  • Entry: NULL Result: [Empty Set]


Technologies used:

NodeJs

ExpressJs

Chai-Mocha

View All Portfolio