Heartbeat Health Interview Question

Simple coding exercise on how you would design an algorithm used in an elevator.