← Questions
Robot charging controller with exclusive stations
0
I was asked this
No reports yet. Sign in to say where you were asked it.
A fleet of robots shares a small number of charging stations. A robot whose battery drops below 50% should go to a free station, and a robot charging above 95% may leave and go back to work; a station holds one robot at a time. Write the controller that is called repeatedly: each time it checks the robots' battery levels and decides who goes to which station and who leaves. Make sure two robots never get the same station and that repeated polling does not send the same robot twice.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
