Description of College project: I work in a very tall building with a very slow elevator. It's frustrating when people push the buttons on many neighbors floors (let's say 13, 14 and 15) when I go downstairs to the penthouse. In this case, my trip to the penthouse is interrupted three times, once in each of these floors. It would be more polite if the three people agreed to push only the 14th - on floors 13 and 15, people would go up or down the stairs on one floor. Your task is to write an elevator optimization program. All people say beforehand as they enter the elevator (downstairs) the intention of the floors on which they wish to go. The elevator then decides which floors will stop. The elevator is limited to stopping at a maximum of K floors so as to minimize the number of people who need to go up / down stairs.
Note: Running this requires Git and npm.
In your terminal:
# Clone the repository
$ git clone https://github.com/gustavosatheler/smart-elevator.gits
# Go into the repository
$ cd smart-elevator
# Install dependencies
$ npm install
# Run the app
$ npm run app
# Run the debug
$ npm run debug
Note: Running this requires .
# Build app
$ npm run build