shivanshuchourasia / coffee-machine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Coffee Machine

It computes whether the coffee order can be prepared or not with the ingredients available. It also indicates the ingredients that are needed to be refilled.

Setup

npm i

Run with Default Input

npm start

Run all the testcases

npm run test-cases

Test with all the testcases

npm test

Notes

All the testcases have been stored as an array in testCases.js file. The logic has been written in preparation.js file.

Assumptions

The assumption that the next order can be started preparing as soon as any outlet is vacant has been made.

About


Languages

Language:JavaScript 100.0%