/kiki

Primary LanguageTypeScript

Kiki and Tombo courier service

For technical specification please read here

Note: Currently errors are not handled and expects the valid input from the user. It doesn't give descriptive errors to fix the input

Background

Kiki, a first-time entrepreneur from the city of Koriko has decided to open a small distance courier service to deliver packages, with her friend Tombo and cat Joji.

Kiki has invested in N no. of vehicles and have driver partners to drive each vehicle & deliver packages.

Before we begin how we can leverage this CLI tool, we need to setup everything needed. Just follow simple steps to install:

Clone repo

git clone https://github.com/vemarav/kiki.git
cd kiki

Install kiki, tombo commands

npm install    # install required node_modules/npm packages
npm test       # this will ensure everything is intact and ready to use
npm run build  # generate bundles to install
npm link       # it will install kiki, tombo commands

Problem 01

Delivery Cost Estimation with Offers

kiki "100 3
PKG1 5 5 OFR001
PKG2 15 5 OFR002
PKG3 10 100 OFR003"

Output

PKG1 0 175
PKG2 0 275
PKG3 35 665

Problem 02

Delivery Time Estimation

tombo "100 5
PKG1 50 30 OFR001
PKG2 75 125 OFFR0008
PKG3 175 100 OFFR003
PKG4 110 60 OFFR002
PKG5 155 95 NA
2 70 200"

Output

PKG1 0 750 3.98
PKG2 0 1475 1.78
PKG3 0 2350 1.42
PKG4 105 1395 0.85
PKG5 0 2125 4.19

If the commands fail to work please create an issue here

Author: @vemarav