# queues medium

The Night Watch

The guards rotate shifts in strict order, night after night, forever. πŸŒ™

You get the guards and a number of nights. Print the guard on duty for each night, in order, space-separated.

Example:

Input: guards = ["sir-reg", "dame-flo", "sir-pod"], nights = 5 Output: sir-reg dame-flo sir-pod sir-reg dame-flo

Night i (counting from 0) belongs to guard i % 3, cycling through the roster and wrapping back around after night 2.

πŸ’‘ need a hint?

q-night-watch.pyπŸ”’ given lines are locked β€” write your code in between
loading...