Tractive Interview Question

Code and schematic analysis